General information
Title:
Controlling other applications from VFP
I need to be able to send data to another application that is running as if the data were typed into the keyboard. My VFP program uses the Win32API to BringWindowToTop and then ShowWindow. It was suggested that I use some code similar to the following to "pass" data to the application but it sends it to the first text box in what I would call the tab order. I need the character string to be inserted at the current cursor location. Tried this but didn't quite work the way I need it too.
oWSH = CREATEOBJECT("wscript.shell")
oWSH.AppActivate({Application Name Goes Here})
oWSH.SendKeys("12345")
The field I need the data to go into is currently active field after I issue a _SCREEN.WindowState=1. This field also in not in the TAB rotation, so i cannot just issue several tabs until its on the correct field.
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only