Web Browser: Customize On-The-Fly
Here it is. Download the latest version here:
REMOVED
Please delete any previous device versions from previous installs (Browser1 and ExternalControl) and use the included .hbx to import the devices new. Properties have been deleted as I felt they were a bit superfluous and increased the complexity of the devices. Deleted properties include:
Red
Blue
Green
Offset
FlatBrowser
I have opted to present the browser as always flat and only showing the browser panel with no borders. The option for scrollbars is still present and now includes a fix so that frames are displayed correctly on certain pages.
The biggest change is the use of command line parameters for the program (thanks to dlmorgan999). The parameters that can be passed follow the syntax used by Scott in External Control and are as follows:
/P [IP Address of HouseBot server]
/O [Port number of external control device]
/S [Password of external control device - if no password and asterix (*) must be passed]
/D [Name of the device in HouseBot controlling the browser]
/C [instance type of browser application - SIB = single instance browser and MIB = multi-instance browser]
Example usage in Execute Program Device argument property:
/P 127.0.0.1 /O 5000 /S * /D Browser1 /C SIB
Let me know how it is working for you and definately report any bugs you discover.
Osler
REMOVED
Please delete any previous device versions from previous installs (Browser1 and ExternalControl) and use the included .hbx to import the devices new. Properties have been deleted as I felt they were a bit superfluous and increased the complexity of the devices. Deleted properties include:
Red
Blue
Green
Offset
FlatBrowser
I have opted to present the browser as always flat and only showing the browser panel with no borders. The option for scrollbars is still present and now includes a fix so that frames are displayed correctly on certain pages.
The biggest change is the use of command line parameters for the program (thanks to dlmorgan999). The parameters that can be passed follow the syntax used by Scott in External Control and are as follows:
/P [IP Address of HouseBot server]
/O [Port number of external control device]
/S [Password of external control device - if no password and asterix (*) must be passed]
/D [Name of the device in HouseBot controlling the browser]
/C [instance type of browser application - SIB = single instance browser and MIB = multi-instance browser]
Example usage in Execute Program Device argument property:
/P 127.0.0.1 /O 5000 /S * /D Browser1 /C SIB
Let me know how it is working for you and definately report any bugs you discover.
Osler
Last edited by Osler on Wed Feb 04, 2009 11:10 pm, edited 1 time in total.
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
I still can't run the install- just tried the new one and get the same results. Could not create directory. I tried changing the default, doesn't seem to matter, I get the same error.Osler wrote:I just re-read the posts and see that markd had an issue when I thought it was roussell.
markd, did you get this to work yet or are you still having issues?
Osler
I tried to figure out what the install (last version, not this one) was doing so I could do it all manually, but I must have missed something, not having any luck. :-(
Thanks for following up!
Markd
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
It appears I spoke too soon! I just integrated the new version of the executable into my production environment. When I open the remote the first time it works great. If I close the remote and open it again though I get another instance of HouseBot_Browser.exe even though I'm using the SIB parameter to start it (at least that what's appears to be happening).
My initial testing was done running the browser on the same server as the HouseBot server. The production testing above was done running a remote on a separate PC. What code are you using to detect the presence of an existing browser? Would you mind sending me the current version of the VB project?
-- Dave
My initial testing was done running the browser on the same server as the HouseBot server. The production testing above was done running a remote on a separate PC. What code are you using to detect the presence of an existing browser? Would you mind sending me the current version of the VB project?
-- Dave
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
In case it would be helpful, here are a few links to pages that show how to get information on the running processes. The last link is probably the best and most current:
http://support.microsoft.com/kb/187913
http://www.thescarms.com/vbasic/RunningProcs.asp
http://www.vbaccelerator.com/home/Vb/Ti ... rticle.asp
If you already have code to handle this then I'm not sure what's happening in my situation. I'll be happy to help debug though if that would be useful.
-- Dave
http://support.microsoft.com/kb/187913
http://www.thescarms.com/vbasic/RunningProcs.asp
http://www.vbaccelerator.com/home/Vb/Ti ... rticle.asp
If you already have code to handle this then I'm not sure what's happening in my situation. I'll be happy to help debug though if that would be useful.
-- Dave
markd:
You don't have to use the installer....its just a convenience. All you need to do is ensure the HBControlMod.dll and ccrpTmr6.dll are registered. Once that is done the executable should have no problems. Both dll's and the executable can be located in the Support folder of the download. Try registering the dll's and bag the installer program.
dlmorgan999:
Hehe...alright, the way I check the instance ain't as robust as the API calls. I was trying to avoid this. I am testing the App.PrevInstance boolean to check it. Now, one of the problems I encountered was if I enclosed the command line arguments in quotes (e.g., "/P 127.0.0.1 blah blah /C SIB"), the quote is added to the InstanceType parameter in the code (i.e., InstanceType = SIB" and not plain old SIB). If you are using quotes, try foregoing them and see if it fixes the problem. If this is the case I will go back and enhance the string manipulations I am doing to make sure this doesn't happen. If the variable InstanceType is anything BUT SIB, a multi-instance application is spawned (i.e., default).
Osler
You don't have to use the installer....its just a convenience. All you need to do is ensure the HBControlMod.dll and ccrpTmr6.dll are registered. Once that is done the executable should have no problems. Both dll's and the executable can be located in the Support folder of the download. Try registering the dll's and bag the installer program.
dlmorgan999:
Hehe...alright, the way I check the instance ain't as robust as the API calls. I was trying to avoid this. I am testing the App.PrevInstance boolean to check it. Now, one of the problems I encountered was if I enclosed the command line arguments in quotes (e.g., "/P 127.0.0.1 blah blah /C SIB"), the quote is added to the InstanceType parameter in the code (i.e., InstanceType = SIB" and not plain old SIB). If you are using quotes, try foregoing them and see if it fixes the problem. If this is the case I will go back and enhance the string manipulations I am doing to make sure this doesn't happen. If the variable InstanceType is anything BUT SIB, a multi-instance application is spawned (i.e., default).
Osler
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
I'll play around with your suggestions a bit - thanks. If that doesn't work I've already done most of the work needed to detect using the APIs (from the last link I sent you). If I can't get it to work using the method you suggested I would be happy to add the API support to your code if you like.
-- Dave
-- Dave
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
Osler,
The attached ZIP file appears to be handling instance detection correctly. As far as I can tell this should work no matter how the program is started and no matter what OS it's running on. It should also take care of the quote issue. Let me know what you think.
-- Dave
(note: after I posted this I realized that the exe in the Zip file is NOT the current version. I was compiling it directly to the Program Files directory for easier testing. Make sure you compile a new copy before you test it)
The attached ZIP file appears to be handling instance detection correctly. As far as I can tell this should work no matter how the program is started and no matter what OS it's running on. It should also take care of the quote issue. Let me know what you think.
-- Dave
(note: after I posted this I realized that the exe in the Zip file is NOT the current version. I was compiling it directly to the Program Files directory for easier testing. Make sure you compile a new copy before you test it)
- Attachments
-
- HBBrowserMutex.zip
- (18.37 KiB) Downloaded 795 times
Ok this works and works well. I sat with the Task Manager open and kept hitting execute program from within HB. At most, a second instance of the browser appears for a split second and then is gone in a flash. Nice work dlmorgan999. The fixes provided by dlmorgan can be found in the latest version:
REMOVED
Osler
REMOVED
Osler
Last edited by Osler on Wed Feb 04, 2009 11:11 pm, edited 1 time in total.