You could also use the Windows API functions; FindWindow and SetForegroundWindow. Use it both to make sure the SendKeys or other functions you use to send the keystrokes, works all the time.
quote:Originally posted by Mike2
Sendkeys is not the best way to press a key since it wont work all the times.
Use the keyb_event
Here's an example from AllAPI:
[SNIPPED]
IIRC that is just the way sendkeys works in a way, it's as dodgy as the API...