Calling all VB gurus. Can you goive me an example of code that opens notepad and using sendkeys send keystrokes.
I read the manual and it makes sense but I cannot get it to work. It seems to have a focus problem I can't solve.
I use:
Shell("notepad.exe")
sendkeys "Just a test",true
sleep 10000
Sendkeys "%{F4}",true
end
This should open notepad insert "Just a test" and then wait 10 seconds and close notpad. While Machvb is in focus it runs up to the sendkeys and stops. IF I click on notepad and gain focus the VB stops .
Any ideas or examples would be appreciated, (;-) TP