|
-
Sep 28th, 2000, 07:26 PM
#1
Thread Starter
Addicted Member
I'd like to send ctrl-A to another program that isn't currently active. Ideally I'd like to trigger mouse events, key sequences on the other program. Basically I'd like to write a Macro program to interface with an already written program.
Anyone have any information on how to do this? I'm thinking I'd have to use the FindWindow API, but I'm lost after that...
Thanks,
Dim A
-
Sep 29th, 2000, 03:11 AM
#2
Frenzied Member
You can use AppActivate to active a program that is already running;
eg
Code:
AppActive "Notepad",True
If you catch an error from AppActivate it means the app is open, so you can then use Shell to open it, and then AppActivate it.
Once it is active you can use SendKeys to send keystrokes to it;
eg
Code:
Sendkeys "Hello",True 'sends Hello to the program
Sendkeys "^A",True 'sends CTRL+A to the program
See the SendKeys help for more info
'Buzby'
Visual Basic Developer
"I'm moving to Theory. Everything works there."
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
|