Jump to content
smarty

Geo Control via Windows Sendmessage Utility

Recommended Posts

Ok, this is a question for those with intimate GeoVision software knowledge.

 

I am trying to control my Geo DVR by using a Windows messaging utility (the one that comes with SageTv.....but it works with any MS Windows program).

 

In order to do this, I need to know: "WindowClass", "WindowName", "MsgID", "wParam" and "lParam" for the actions that Geo can perform.

 

Where:

WindowClass: Define the window class name to recieve multiple messages.

 

WindowName: Define the name of the window to recieve multiple messages.

 

MsgID: The windows message number to be sent; decimal value

wParam: The messages wParam value to be sent; decimal value

lParam : The messages lParam value to be sent; decimal value

 

 

Maybe the best way to start is to duplicate all the functionality of the buttons on the Geo IR remote control. Does anyone (Rory?) have some ideas of how to accomplish this?

Share this post


Link to post
Share on other sites

Sure .. i started it, but i dont have the IR remote anymore ..

 

Basically though in VB6 ..

 

this is how i was getting the keys, the ones i got are all the top keys on the IR Remote. ,, I comented out etc until i got the keys .. gives you an idea ..

 

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
   'Debug.Print KeyCode
End Sub

Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer)
   'Debug.Print "---------"
End Sub

Private Sub Timer1_Timer()
   If (GetAsyncKeyState(17) <> 0 And GetAsyncKeyState(18) <> 0 And GetAsyncKeyState(49) <> 0 And KEY_DOWN) Then Text1 = "KEY1"
   If (GetAsyncKeyState(17) <> 0 And GetAsyncKeyState(18) <> 0 And GetAsyncKeyState(50) <> 0 And KEY_DOWN) Then Text1 = "KEY2"
   If (GetAsyncKeyState(17) <> 0 And GetAsyncKeyState(18) <> 0 And GetAsyncKeyState(51) <> 0 And KEY_DOWN) Then Text1 = "KEY3"
   If (GetAsyncKeyState(17) <> 0 And GetAsyncKeyState(18) <> 0 And GetAsyncKeyState(52) <> 0 And KEY_DOWN) Then Text1 = "KEY4"
   If (GetAsyncKeyState(17) <> 0 And GetAsyncKeyState(18) <> 0 And GetAsyncKeyState(53) <> 0 And KEY_DOWN) Then Text1 = "KEY5"
   If (GetAsyncKeyState(17) <> 0 And GetAsyncKeyState(18) <> 0 And GetAsyncKeyState(54) <> 0 And KEY_DOWN) Then Text1 = "KEY6"
   If (GetAsyncKeyState(17) <> 0 And GetAsyncKeyState(18) <> 0 And GetAsyncKeyState(55) <> 0 And KEY_DOWN) Then Text1 = "KEY7"
   If (GetAsyncKeyState(17) <> 0 And GetAsyncKeyState(18) <> 0 And GetAsyncKeyState(56) <> 0 And KEY_DOWN) Then Text1 = "KEY8"
End Sub

Share this post


Link to post
Share on other sites

as to the window handles, you would first need Geo running, then a program like Spy+ which is in Visual Studio for example .. or you could make your own .. otherwise id have to install geo on my PC as it isnt at this time .. but i can if you really need it ..

 

Why dont you just use the Geo IR remote though?

 

Wih SendMessage, its going to be tough, you may even need SendNotifyMessage instead .. as i did with the Geo Installer.

 

Another tip, Geo doesnt like SendMessage and Handles .. at least their installer doesnt .. which however is a very old InstallShield Version.

 

In otherwords to be able to send a message to it, such as a simple click ..

you first need to get the handle of the button you want to click ..

so you use the button class and title .. you need the parents handle first also most of the time. Anyway, its at that part when you are getting the handle that I would experience errors and crashes, after a few different tries at getting the handle successfully.

 

But that said if its just a few then you can try it and see what happens.

Plus my errors were experienced with the installer only.

 

Rory

Share this post


Link to post
Share on other sites

Can't help you but it'll be uber cool once figured out.

 

 

The IR remote simply emulates keypresses, Geo MUST have focus for their remote to work. It is definately not based on windows sendmessage.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×