|
-
Feb 15th, 2000, 10:14 PM
#1
Thread Starter
Lively Member
i've been trying to use the sendkeys function to trigger some events in another application. everything works fine until i try to do an Alt-v or an F9. this is my syntax:
sendkeys "%(v)" 'alt-v
sendkeys "{F9}" 'f9
i get no response from either of these. i've doubled checked to see that these are indeed the correct keystrokes and that they'll work regardless of cursor location. everything checks out.
-
Feb 16th, 2000, 03:41 PM
#2
Hyperactive Member
Hello,
Are you testing with a DOS application?
If yes, you have a problem.
If your Windows application is correct working with your keyboard keys, it must work (thats my experience)
a other possibility is to use:
sendkeys "%(v)", True
sendkeys "{F9}", True
The Boolean True: keystrokes must be processed before control is returned to the procedure.
Nice regards,
Michelle
-
Feb 17th, 2000, 04:14 AM
#3
Thread Starter
Lively Member
thanks for your help, michelle. after playing with the program, i figured out half of the problem. whenever i use the % for alt, the receiving program attempts to locate a menu item and not a shortcut key. i just found a way to work around it and it goes just fine. the "{F9}" statement, however, i have no idea why it doesn't work. i used you suggestions and still nothing. just an odd note, if i use the same statement i have been using in the immediate window, everything works fine. if i put it into my program, it bombs.
thanks again.
-
Feb 17th, 2000, 11:14 PM
#4
Hyperactive Member
Darell,
You may want to try sending the Escape key before sending F9 just in case the menu is retaining its focus.
Wade
[This message has been edited by WadeD (edited 02-18-2000).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|