It's starting to look like sendkeys isn't what I need.
On the contrary, it IS what you want.... I told you how to fix your code... all you need to do is remove part of your code... what's happened is that you have defined your OWN CUSTOM SendKeys class... and the rules of ... of... what ever... Scope I guess... says that the lowest defined level of some object rumps all above... so at the moment, it's as if SendKeys doesn't exist since you over wrote it with your own... and your own version does nothing...
This is what you need:
Code:
Module Module1
Sub Main()
AppActivate("Untitled - Notepad")
System.Threading.Thread.Sleep(2000)
SendKeys.Send("hello")
System.Threading.Thread.Sleep(2000)
End Sub
End Module
That's it... no more, no less... well you can have more if you want to send more than just "hello"... you get the idea... for all intents and purposes, that should work... Now... it COULD "fail" IF notepad doesn't get focus...and by fail, I mean the keys are sent, but not received by notepad. That's where the shortcommings of SendKeys usually become a problem.
-tg