Web Browser: Customize On-The-Fly
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
Basically what this is doing is *creating* a uniquely-named "mutex" when the program starts. Windows does not allow duplicate mutex names so what I did is to create a mutex (it's in the Form_Load procedure inside the single instance check block).
The mutex stays "registered" as long as the class module is loaded. If you try to run another instance with the SIB switch it will try to register the same mutex again. When it tries that will fail and the second instance will close. Does that make sense?
-- Dave
The mutex stays "registered" as long as the class module is loaded. If you try to run another instance with the SIB switch it will try to register the same mutex again. When it tries that will fail and the second instance will close. Does that make sense?
-- Dave
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
You're welcome - I'm glad I could help out! I've been wanting to write some kind of cool thing for HouseBot for a while but I could never come up with anything useful.
Your method of using the external control device is very creative! As Scott mentioned it opens up all kinds of possibilities for enhancing software remotes. It will even allow the use of things written in a .NET language given the proper use of a COM wrapper. Now I just have to come up with something cool to write .
-- Dave
Your method of using the external control device is very creative! As Scott mentioned it opens up all kinds of possibilities for enhancing software remotes. It will even allow the use of things written in a .NET language given the proper use of a COM wrapper. Now I just have to come up with something cool to write .
-- Dave
It has definitely inspired me! Using the Express Edition of C#; I wrapped the HB.dll in a script that parses the status web page on my Linksys PAP2 voice adapter and sends HB the last caller and last dialed number. I'm working on adding other features and as soon as it's half-way presentable I'll post it and the source to the group.
Terry
Terry
Thanks- I tried that, but I can't register the DLLs either- I get obscure (even after googling) error messages.Osler wrote: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.
Osler
I'm thinking that I'm going to buy a new disk and do a clean install- this is an ancient, encrusted machine. Now that it is just running HB, it is probably appropriate to scrape it down completely.
Markd
-
- HouseBot Special Member
- Posts: 409
- Joined: Tue Jul 13, 2004 9:13 am
- Location: Tigard, OR
Ok, I'm finally getting around to trying this again. . . after the rebuild, I was able to run the install no problem on my HB server. Using the sample in the readme file, I can get a browser window to open on the server, and respond to the controls. Yay!
But I'm having troubles running it on my sw remote systems. I think (hope ;-) I'm missing something obvious. I tried installing HB Browser on the SW remote system, but when I run it, it says it can't connect with the server . . . ??
Erasing all assumptions, can someone walk me through the steps to get a browser window to open on a system other than the HB server?
Thanks
Markd
But I'm having troubles running it on my sw remote systems. I think (hope ;-) I'm missing something obvious. I tried installing HB Browser on the SW remote system, but when I run it, it says it can't connect with the server . . . ??
Erasing all assumptions, can someone walk me through the steps to get a browser window to open on a system other than the HB server?
Thanks
Markd
Sorry for being tardy with my response. We just had a new addition to the family and things have been very, very busy of late. So here is a step-by-step for using the browser on a remote machine:
1. Install the browser on the remote machine.
2. Create a new task on the server that executes HBBrowser.exe on the calling remote machine. Be sure to include appropriate command line arguments, most importantly:
the IP address of the server machine (NOT 127.0.0.1)
the port number for the external control device
the password (if none use *) for the external control device
the instance type (SIB or MIB)
3. Execute the task from the SWRemote (either on page entry or by button) and away you go. Use other buttons and inputs to change the parameters of the Browser1 device to load pages, go back, etc.
Also, the issues I asked about in my last post were not attributable to the HBBrowser.exe. The apparent performance hit was actually due to some issues with the SWRemote connecting to the server.
Osler
1. Install the browser on the remote machine.
2. Create a new task on the server that executes HBBrowser.exe on the calling remote machine. Be sure to include appropriate command line arguments, most importantly:
the IP address of the server machine (NOT 127.0.0.1)
the port number for the external control device
the password (if none use *) for the external control device
the instance type (SIB or MIB)
3. Execute the task from the SWRemote (either on page entry or by button) and away you go. Use other buttons and inputs to change the parameters of the Browser1 device to load pages, go back, etc.
Also, the issues I asked about in my last post were not attributable to the HBBrowser.exe. The apparent performance hit was actually due to some issues with the SWRemote connecting to the server.
Osler
thanks- I am making some progress. I was missing the whole task thing.
1. Check.
2. Check. C:\Program Files\HouseBot_Browser\housebot_browser.exe and
/P 192.168.1.101 /O 5000 /S * /D Browser1 /C SIB.
Using your External Control, with the IP Port set to 5000, and nothing in the Password field. (So the password above is the password in External Control- that is one thing that was not clear to me before)
Question- if I run multiple SWremotes with multiple browsers, do I send them all to one External Control, one port?
I execute the task, which causes an attempt to open the browser, but all I get is the Unable to connect to HouseBot. Please ensure Housebot is open and External Control is configured. Which they are.
I randomly tried changing the port to 2000, but no change.
thanks!
markd
1. Check.
2. Check. C:\Program Files\HouseBot_Browser\housebot_browser.exe and
/P 192.168.1.101 /O 5000 /S * /D Browser1 /C SIB.
Using your External Control, with the IP Port set to 5000, and nothing in the Password field. (So the password above is the password in External Control- that is one thing that was not clear to me before)
Question- if I run multiple SWremotes with multiple browsers, do I send them all to one External Control, one port?
I execute the task, which causes an attempt to open the browser, but all I get is the Unable to connect to HouseBot. Please ensure Housebot is open and External Control is configured. Which they are.
I randomly tried changing the port to 2000, but no change.
thanks!
markd
Hmmm....the browser can't see the server even though your SWRemote can. I will have to look at this tonite as I don't have the final project code on this computer. I think this may be a network issue as opposed to a browser issue. I will expose the error message being thrown by HBControl and let you see what it is telling you. Look for a post later today or tomorrow with the updated program (if the forums stay up).
Osler
Osler