Sendkeys in PB? 
Author Message
 Sendkeys in PB?

Is there an equivalent command in PB for the VB command Sendkeys. I want to
send
some keystrokes to another program running on the system. I've used the
Shell function
to start the other program.

TIA



Fri, 22 Apr 2005 23:36:50 GMT  
 Sendkeys in PB?
Hi John,

The VB SendKeys() function is essentially a wrapper function for the
keybd_event() API function,  Examples can be found on the powerbasic
web BBS at http://www.powerbasic.com/support/forums/Ultimate.cgi --
just search for "keybd_event".

That said, the keybd_event() method is not guaranteed to be foolproof,
since an unexpected focus change will divert the keystrokes along with
the focus shift (since the keystrokes go into the System queue, rather
than the queue associated with the thread that owns the target
window/dialog).

The most reliable way of dealing with sending keystrokes is to use a
JournalPlayback() routine.  At least one example can be found on the
web BBS too, but if you email me at Tech Support, I'll reply with  the
source code (for PB/Win 7.0).

I hope this helps!

Quote:

>Is there an equivalent command in PB for the VB command Sendkeys. I want to
>send
>some keystrokes to another program running on the system. I've used the
>Shell function
>to start the other program.

>TIA

Lance
PowerBASIC Support

-------------------------------------------------------------------------
PowerBASIC, Inc.      | 800-780-7707 Sales | "We put the Power in Basic!"
316 Mid Valley Center | 831-659-8000 Voice | http://www.powerbasic.com



Sat, 23 Apr 2005 21:31:14 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. PB 3.2.PB/Vision 2.0 Timerinstallcode.Shared Arrays

2. MX Lookup with PB/CC or PB/DLL

3. TCPADDR for PB/DLL & PB/CC

4. Info on new PB/CC and PB/DLL

5. Announcing the JazzAge COM Wizard for PB/DLL and PB/CC

6. animated characters, speech input/output in PB/DLL and PB/CC

7. email enable PB/DLL-PB/CC using Outlook

8. SQL, ADO/OLE-DB programming in PB/DLL and PB/CC

9. Sendkeys function from Rexx toward a PM-program ?

10. Sendkeys without Scripting Host

11. Scripting Windows GUI application with Python (SendKeys)

12. Sendkeys

 

 
Powered by phpBB® Forum Software