Page 3 of 12
Posted: Thu Jan 25, 2007 3:05 pm
by Osler
I have fixed the resolution issue. I forgot I had added a 60 pixel pad to the resolution sizing when I first wrote this.
I have also gotten rid of the margins within the webbrowser so that if you display a .gif it is top and left most with no white line on any side.
In doing this, Offset looses functionality when FlatBrowser = True; however, if you're making the browser flat you probably don't want the rim anyways.
dlmorgan999:
I am investigating the URL issue now.
Osler
Posted: Thu Jan 25, 2007 3:37 pm
by dlmorgan999
You can ignore the URL issue. It appears to have been caused because I was using a task button which set the URL and then immediately did a refresh. After you mentioned that I didn't need to do anything other than set the URL I removed the refresh command. Then everything worked as expected.
The VB6 code looks great - nice job! I was especially impressed to see your use of some of the WIN32 functions. I had one idea that would make it easier to maintain in the future but I'll share that with you later (I'm at work right now).
-- Dave
Posted: Thu Jan 25, 2007 3:47 pm
by Osler
Hehe...API calls are the bane of my attempts at coding in VB. It can be a very powerful language for simple tasks such as this...however, to make things *look* cool it fairs poorly with its standard implementation.
One thing I have changed as a result of this is to use browser.navigate2 instead of browser.navigate. This allows you to use the browser for things that can't be encapsulated in a URL (such as a PIDL for an entity in the windows shell namespace). I will never use this, but I'm sure there are folks out there that will.
I have also added some additional error trapping. I ran into a nice overflow error when I set the transparency > 255.
Osler
Posted: Thu Jan 25, 2007 4:04 pm
by dlmorgan999
I ran into a problem trying to use the web interface on my Squeezebox. I haven't yet been able to figure out exactly why it's failing though. The same interface works fine when I open regular IE or FireFox. It is a fairly sophisticated interface though and it may be trying to do things that the web control doesn't support.
On the other hand, it's possible that your change to navigate2 might fix it. The API calls can bit a bit annoying at times but they will allow you to do almost ANYTHING you need - even if you can't do it with native VB.
Posted: Thu Jan 25, 2007 5:44 pm
by Osler
Try loading it with ScrollBars = True. There seems to be an issue that I haven't figured out how to solve. For instance, if you load
http://www.housebot.com with scrollbars off, none of the text or stuff in the center section shows. If you reload it with scrollbars on, it displays correctly. Still hunting for the fix. Let me know if this fixes the slimserver issue.
osler
Posted: Thu Jan 25, 2007 9:05 pm
by dlmorgan999
I got this installed on my production HouseBot server and it went fine. But then I realized that it opens the browser window on the server that's running HouseBot (I don't know why I didn't make this connection before).
Unfortunately this means that I can't really make use of this plugin because I run all of my remotes on PCs other than my (dedicated) HouseBot server. Is there any way to make this work on another machine other than to install another instance of HouseBot with replication?
Also FYI the scrollbar change did not affect the Squeezebox issue. This issue is very limited and it only happens when I enter text in a textbox on the Squeezebox skin I'm using. What I get are script execution errors but if I tell it to continue everything seems to work okay. All other functionality of the Squeezebox web page seems to work okay. My guess is that if I switch to a different skin the problem will go away.
-- Dave
Posted: Thu Jan 25, 2007 9:39 pm
by Osler
Absolutely!! That was the plan.
Navigate to the Browser1Parameters.txt file on the remote machine and set the Port, IP Address, and Password for the server running HouseBot (open the ReadMe file as it describes this in a bit more detail). The parameter after the Password is the name of the device that the browser is to interact with. You could theoretically have multiple instances of the HouseBot_Browser.exe application on the remote machine, each communicating with a unique browser device in HouseBot.
Also, find below a link to the most recent version with resolution fixes and additional error checking. I am still working on the loss of display on some pages when ScrollBars is set to False:
REMOVED
If you already have installed this, you can simply copy the HouseBot_Browser.exe file in the Support folder over to the folder in which the application is already installed. No new DLL's were used for this update.
dlmorgan999:
Does slimserver work when scrollbars = true? (never mind...finally saw the last few lines)
Osler
Posted: Thu Jan 25, 2007 9:55 pm
by Osler
Also, Browser.Navigate2 is an asynchronous function so it shouldn't interfere with script execution. This is apparently a problem with the old Browser.Navigate function. See if SlimServer works with this version.
Osler
Posted: Thu Jan 25, 2007 10:38 pm
by dlmorgan999
I'm not quite following how to set this up on a remote PC. I ran the setup program and then I updated the txt file with the information for the HouseBot server. Then I created a test theme that started the browser program on the remote client. When I then try to start the browser using the ExecuteProgram property it still starts up on the HouseBot server. What am I missing?
Also what is the purpose of the "Path and Name of Program" property? It seems like this would be what gets run when the ExecuteProgram property is set. If this is true wouldn't it need to be pointing to the program on the remote PC?
-- Dave
Posted: Thu Jan 25, 2007 10:56 pm
by dlmorgan999
Never mind my last post - I finally got this working. Now I'll test some of the other things you asked about and get back to you. Thanks!
Posted: Thu Jan 25, 2007 11:11 pm
by Osler
I have yet to try this on a remote PC. I had assumed that you could make the folder on the remote PC shared and send an execute command via the network. Dunno if this works though.
The other option is to include the browser application in a batch file that starts with the SWRemote on the remote PC. When not needed for display on the theme set the transparency to 0.
Please share which method (or any other) you used to accomplish this.
Osler
Posted: Fri Jan 26, 2007 12:16 am
by dlmorgan999
From what I can see of the "Execute Program" device, the program will always start on the HouseBot server. Here is how I solved this problem:
- I created a task on the HouseBot server
- the task contains an "Execute Application" action that starts the browser on the calling remote
- I added this task to the enter list of the desired panel on a theme
- I added various test buttons (URL, transparency, etc) to the theme
This is allowing me to play with the various features so I can decide how I want to use it. Ideally it would be nice if the browser was started at startup of the remote PC (in my case a UMPC). The problem with this is that if the process ever stops (for what ever reason) then the browser won't work.
It might be nice to create a "single instance" version of the browser. This version could check for the existence of an already running browser. If it finds one it could just close itself. This would allow for adding a task on a panel to start the browser but would keep you from ending up with many running browsers on the remote PC.
I realize that in some cases (especially on a device with more screen space than the UMPC) you might want multiple instances of the browser. That's why I proposed a separate version of the program for single instance. What do you think?
-- Dave
Posted: Fri Jan 26, 2007 1:03 am
by Osler
This should be very easy to do. I will try to get a companion browser application out this weekend.
Did you test the squeezebox stuff to see if the scripts are exectuting properly within the browser?
Osler
Posted: Fri Jan 26, 2007 8:49 am
by dlmorgan999
It dawned on me that a more elegant solution (and one that would be easier to maintain) would just be to add a command line parameter to specify single instance (HouseBot_Browser -s for example). Here is an article that shows how to grab the command line parameters in VB6:
http://www.vbexplorer.com/VBExplorer/vb ... uments.asp
Let me know how it goes. If you have questions or need any help let me know that as well.
I tried the Squeezebox page and it still failed. I was in the process of trying a different skin for that page but then my Squeezebox server software got very confused and I had to reboot and eventually upgrade to the newest version to get it working again. After that "distraction" I forgot to come back and test it with the browser app. I'll play with it more this weekend and keep you posted.
-- Dave
Posted: Fri Jan 26, 2007 6:12 pm
by Osler
Ok...this is just cool. Thanks for the link. I have revamped this so that all required parameters are entered as command line arguments. The Browser1Paramters.txt file is a thing of the past. I have also added the capability to make it a single instance or multiinstance application from the command line.
The frame issue with scrollbars off is unsolved. I think this resides within the HTTPDOM, but I am still hunting for an answer. There is a work around to this but I would like to try to find the real issue.
As far as script execution from within the browser....this should be on by default.
I will upload this evening.
Osler