I'm bored so I wrote my own sendkeys function.
Code:
'Written by: Terrankiller
'[email protected]
'Here is an example of a special key const, this one should be obvious if you want to write custom function or add.
'This one in particular is the return key, or enter.
'Public Const VK_RETURN = &HD
Public Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Public Declare Function VkKeyScan Lib "user32" Alias "VkKeyScanA" (ByVal cChar As Byte) As Integer
Public Const KEYEVENTF_KEYUP = &H2
Public Const KEYEVENTF_EXTENDEDKEY = &H1
'You will notice a few problems with characters such as "!.)(,/? you need to program the function accordingly
'This function just parses "Text" and uses keypress to emulate the event
Public Function SendKeys(Text As String)
For i = 1 To Len(Text)
KeyPress (Mid(Text, i, 1))
Next i
End Function
'This function actually "presses" the individual keys
Public Function KeyPress(Key As String)
On Error Resume Next
keybd_event VkKeyScan(Asc(LCase(Key))), 0, KEYEVENTF_EXTENDEDKEY, 0
End Function
'This function is just to "press" the enter key
Public Function KeyPressReturn()
On Error Resume Next
keybd_event VK_RETURN, 0, KEYEVENTF_EXTENDEDKEY, 0
End Function














