|
-
Sep 5th, 2012, 09:13 PM
#1
Thread Starter
Junior Member
sendkeys runs without a problem, but it doesn't actually send any key output
Below I've attached a simple code for sendkeys. I open a Notepad, then execute the code from Visual Studio 2008 (I'm using Win XP) by pressing F5. The program executes fine, and finishes without errors, but nothing is actually outputed to the Notepad. I'd appreciate anyone who can copy/paste this to their VB software and give it a quick run. Don't forget to open a Notepad first. The program will focus on the Notepad, pause for 2 second, then execute the sendkeys function, then pause for 2 seconds and END. Thanks. I've exhausted searching for answers elsewhere.
Module Module1
Public Class SendKeys
Public Shared Sub Send( _
ByVal keys As String _
)
End Sub
End Class
Sub Main()
AppActivate("Untitled - Notepad")
System.Threading.Thread.Sleep(2000)
SendKeys.Send("hello")
System.Threading.Thread.Sleep(2000)
End Sub
End Module
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|