An easy way, is to use AppActivate to set focus on the program u want to control. And then use SendKeys to interract with it.
ex:
AppActivate "Untitled - Notepad"
SendKeys "hello"
U can also use appactivate with en ID:
Dim ID As Long
ID = Shell("notepad.exe", vbNormalFocus)
AppActivate ID
SendKeys "hello"
Main Topics
Browse All Topics





by: mcriderPosted on 2000-10-29 at 04:07:26ID: 4965186
AppActivate "TitleBar Text"
SendKeys "Keys to send",True
Check out the help page for SendKeys.. It shows all of the key strokes that can be sent and how to do it... For example:
SendKeys "{ENTER}", True
Sends an enter...
Cheers!®©