Web Browser: Customize On-The-Fly

General HouseBot discussion. Any issues that don't fit into any of the other topics belong here.
Post Reply
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

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
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Yep...I got it now. Both of your solutions were extremely cool and thank you for sharing them with me (and expanding my knowledge a bit) :wink:

Osler
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

You're welcome - I'm glad I could help out! :D 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 :wink: .

-- Dave
roussell
Advanced Member
Posts: 268
Joined: Wed Dec 15, 2004 9:07 am
Location: Pelham, AL

Post by roussell »

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
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

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
Thanks- I tried that, but I can't register the DLLs either- I get obscure (even after googling) error messages.

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
dlmorgan999
HouseBot Special Member
Posts: 409
Joined: Tue Jul 13, 2004 9:13 am
Location: Tigard, OR

Post by dlmorgan999 »

Now that it's a dedicated HouseBot server, rebuilding it with just the bare minimum needed would be a very good idea. It makes for a really stable system!

-- Dave
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Has anyone noted a hit in software remote performance when the browser is running? I am running a swremote via rdp (smart display) and remote responsiveness seems a bit hit-or-miss while the browser is running. Anyone else with a similar experience?

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

Post by markd »

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
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

Bump- can anyone help?
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

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
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

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
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

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
markd
Advanced Member
Posts: 234
Joined: Fri Jul 21, 2006 4:32 pm

Post by markd »

Yeah, they have been like a super ball recently. ;-)

Thanks!

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

Post by markd »

Hey Osler, you still out there?
Osler
HouseBot Guru
Posts: 742
Joined: Fri Feb 03, 2006 11:18 pm

Post by Osler »

Yes, I am here. I'm sorry, but I barely have enough time to keep my own bottom clean at this point. I promise I will dig out the code and look at it tomorrow. It is just low on my priority list at the moment. Bear with me, please.

Osler
Post Reply