Embedded web browser?

Have an idea for a new feature? Voice your opinion here.
Post Reply
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Embedded web browser?

Post by markd »

Any thought to having an embedded web browser? I was poking around on the MS site today, and it seems like something like this might be possible-

http://msdn.microsoft.com/library/defau ... _entry.asp

I'm guessing that I couldn't write this as a plugin, right?
It would solve a bunch of annoying things like live webcams. . .

Markd
ScottBot
Site Admin
Posts: 2790
Joined: Thu Feb 13, 2003 6:46 pm
Location: Georgia (USA)
Contact:

Re: Embedded web browser?

Post by ScottBot »

markd wrote:I'm guessing that I couldn't write this as a plugin, right?
Markd
Not really. Plugins extend the functionality of the server, but don't help the SWRemotes. You could write something to spawn a browser on a SWRemote machine, but it wouldn't be embedded.

Technically, it may not be too difficult to have the browser embedded in the SWRemote (although I'm not certain how well it would work on WinCE platforms). However, would you want to control it somehow (other than specifying a URL) from the server as well? Or would the control come from the user interacting (or just viewing) with the control?
Scott
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Re: Embedded web browser?

Post by markd »

ScottBot wrote: However, would you want to control it somehow (other than specifying a URL) from the server as well? Or would the control come from the user interacting (or just viewing) with the control?
I can see a lot of utility in just specifying the URL- would work for the webcam issue. Might be nice to be able to set the scroll bars, so you could window into the correct part of a web page.

I'm going to set up a touchscreen next to the couch for driving the theater stuff- one thing I'd like to have on it is IMDB access, with all the linking that implies. I could exit housebot to do it, but it would be nice to have it embedded.

Same thing for searching for recipes in the kitchen. Would also provide a quick and dirty (local webpage) way to do a phone number list.

Markd
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

How funny, I just built this.
It took me some time to get it to work on remote PC's as well so all SWRemotes can do their own thing without interferring with eachother. In that setup every SWRemote PC (in my case a PaceBlade) would have a separate HouseBot server which has a NULL device and a script device for only the browser. The NULL device is a copy from the main server and the script device points to the same browser script on the main server. On the main server, all remote browser null devices are replicated so they can be adressed from different themes on the main server. Each remote PC can access their unique theme on the main server. This keeps all functionality on the main server and creates unique browsers for each remote PC by using the replicator.
Be aware that in this setup all extra HB Server on the remote PC's would require an extra Registration Key and this option will cost money!!!!!! It works very well though.
If you want I can post my script here or in the scriptsection. It opens a small panel bar, has 7 favourites buttons which go unlimited deep per button, has GoBack, GoForward, Refresh and Stop buttons. Has a button to pop a virtual keyboard and an Exit button (Previous Panel).
The browser window is a standard IE COM object window in Fullscreen, so it only shows borders and no status, menu, tool bars etc. This can obviously be changed to own settings in the script. It opens on a set Top, Left, width, height and gets automatic focus whenever someone navigates back or forward etc since IE looses focus because SWRemote theme buttons are pressed.

Let me know if you are interested. I am not able to upload images now etc since I am still at work.

BTW, an ascii phonenumber list could easily be displayed in an alphalist using script. You could even select a phone number an display additional info on it like an address or even a picture using a dynamic image. I have this setup as well.
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Here the screenshot
Attachments
Browser.JPG
Browser.JPG (131.92 KiB) Viewed 3918 times
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

Since I'm headed to 4 touchscreen, that would be a bit expensive! If I was going to spend that much I'd have gone for CQC or Mainlobby. ;-)

I would be interested in the phone number script though!

I have been reading your movie and music scripts trying to get a handle on them- I was hoping that the MediaPro plugin was going to turn up and keep me from having to do the whole Meedio thing, but that isn't looking very likely.

Thanks

Markd
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

I got a basic phonelist working- my first list device, and a little vbs research. . . . Thanks for pointing me in the right direction!

I'd still like to see your script if you get a chance.

Markd
Richard Naninck
HouseBot Guru Extraordinaire
Posts: 1121
Joined: Tue Sep 28, 2004 7:49 am
Location: The Netherlands

Post by Richard Naninck »

Below the code.
It is a continuous running script and it can sort on number or name.
The phonebook ascii file looks like:
1234567890 vbTAB Name1 vbLF
0123456789 vbTAB Neme2 vbLF

Code: Select all

Option Explicit
On Error Resume Next

Dim nit
Dim nic
Dim Action
Dim Sort
Dim TotalLines
Dim FileSystem
Dim StdIn
Dim FileName
Dim objRE
Dim strContent
Dim colLines
Dim PhoneBookLog
Dim Regel
Dim Temp
Dim PhoneName()
Dim PhoneNumber()


Do
	Sleep 1
	Action = GetPropertyValue ("Telefoon Status.PhoneBook Action")
	If Action <> "Waiting" Then
		SetPropertyValue "Telefoon Status.PhoneBook Action", "Waiting"
		SetPropertyValue "Telefoon Status.Log PhoneBook", ""
		Sort           = GetPropertyValue ("Telefoon Status.PhoneBook Sort")
		FileName       = "C:\Program Files\XAN ISDN-Anrufbeantworter\Einstellungen\Telefoonboek.DAT"
		PhoneBookLog   = ""
		Set FileSystem = CreateObject("Scripting.FileSystemObject")
		Set StdIn      = FileSystem.OpenTextFile(FileName, 1)
		
		If Err.Number = 0 Then
			strContent     = StdIn.ReadAll
			Set objRE      = New RegExp
			objRE.Global   = True
			objRE.Pattern  = ("\n")
			Set colLines   = objRE.Execute(strContent)
			
			ReDim PhoneName(colLines.count + 1)
			ReDim PhoneNumber(colLines.count + 1)
		
			Set StdIn  = FileSystem.OpenTextFile(FileName, 1)
			TotalLines = 0
			Do Until StdIn.AtEndOfStream
				Regel                   = Split(StdIn.ReadLine, Chr(9))
				PhoneNumber(TotalLines) = Regel(0)
				PhoneName(TotalLines)   = Regel(1)
				TotalLines              = TotalLines + 1
			Loop
		
			If Sort <> "Nummer" Then
				For nit = 0 to TotalLines
					For nic = nit + 1 to TotalLines
						If PhoneName(nic) < PhoneName(nit) Then
							Temp             = PhoneName(nic)
							PhoneName(nic)   = PhoneName(nit)
							PhoneName(nit)   = Temp
							Temp             = PhoneNumber(nic)
							PhoneNumber(nic) = PhoneNumber(nit)
							PhoneNumber(nit) = Temp
						End If
					Next
				Next
			Else
				For nit = 0 to TotalLines
					For nic = nit + 1 to TotalLines
						If PhoneNumber(nic) < PhoneNumber(nit) Then
							Temp             = PhoneName(nic)
							PhoneName(nic)   = PhoneName(nit)
							PhoneName(nit)   = Temp
							Temp             = PhoneNumber(nic)
							PhoneNumber(nic) = PhoneNumber(nit)
							PhoneNumber(nit) = Temp
						End If
					Next
				Next
			End If
			
			For nit = 1 to TotalLines
				PhoneBookLog = PhoneBookLog + PhoneName(nit) + "#" + PhoneNumber(nit) + vbTAB + PhoneName(nit) + vbTAB + PhoneNumber(nit) + vbLF
			Next
			
			StdIn.Close
			Set colLines = Nothing
			Set objRE    = Nothing
		Else
			PhoneBookLog = vbTAB + "Geen telefoonboek datafile gevonden!"
			Err.Clear
		End If

		SetPropertyValue "Telefoon Status.Log PhoneBook", PhoneBookLog
		Set StdIn      = Nothing
		Set FileSystem = Nothing
	End If
Loop
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

Thank you. I'm learning vbscript from your excellent examples. ;-)

I think I'm going to use an export from outlook to populate my data file- that way I can have one central point for maintaining phone numbers. That Split command should come in handy for the CSV file. I'm going to use the Categories fields to slice and dice the list down to a few different list properties- one for the kids, one for family, etc.

Thanks again!

Markd
Post Reply