Source language: Translate to:

SendKeys to cmd.exe When PUB is always OnTop?

Questions or information that don't quite fit anywhere else

Moderator: Neosoft Support

SendKeys to cmd.exe When PUB is always OnTop?

Postby phlm » Sat Dec 02, 2006 8:34 pm

Is there a way or workaround to use the SendKeys command to an application running behind my PUB that is alway on top and in full screen mode?

I've tried hpwSendKeysToHandle which works in demo mode but after compiling it no longer works.

Thanks for any help on this.
phlm
 
Posts: 6
Joined: Mon Nov 13, 2006 12:01 pm

Postby HPW » Sun Dec 03, 2006 1:24 am

I've tried hpwSendKeysToHandle which works in demo mode but after compiling it no longer works.


Which neobook version? (NB5 demo mode is quite similar to compiled)
Demo mode does not make a difference.
Where do you get the handle from? Is it valid?
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby phlm » Sun Dec 03, 2006 12:20 pm

Hi HPW!
I'm using NB 5.5.2a.
And I look up the handle via hpwFindaWindow. In regards to it being the right handle I don't know. Should cmd.exe come up with the same handle each time?

Thanks
phlm
 
Posts: 6
Joined: Mon Nov 13, 2006 12:01 pm

Postby HPW » Sun Dec 03, 2006 2:14 pm

Should cmd.exe come up with the same handle each time?


Definatly not. Windows set the handles everytime new.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby phlm » Sun Dec 03, 2006 2:26 pm

Hi Hans-Peter,
Well I run hpwFindaWindow before I do a hpwSendKeysToHandle so I'm OK there...
Still can't get the pub to run correctly after compile.
phlm
 
Posts: 6
Joined: Mon Nov 13, 2006 12:01 pm

Postby HPW » Sun Dec 03, 2006 11:25 pm

Take the hpwSendkeys demo pub and compile it.
Start it and type in the title string of your manually started cmd-window.
Press 'FindAWindow' and see is a handle number appears in the first field of 'Send To Handle'.
Type in some Text in the middle field of 'Send To Handle'.
Press 'Send To Handle'.

Does the text appear in cmd-window?

This works for me here.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby phlm » Mon Dec 04, 2006 11:55 am

Hi Hans_Peter,
I found the error...
Run "!C:\WINDOWS\system32\cmd.exe" "" "LoadComplete" "" "[Command]"

The LoadComplete doesn't really mean cmd.exe is ready to accept input. I added a delay and everything works fine now.

Thanks for you help!
phlm
 
Posts: 6
Joined: Mon Nov 13, 2006 12:01 pm


Return to Misc. Questions and Information

Who is online

Users browsing this forum: No registered users and 2 guests