Const VK_H = 72
Const VK_E = 69
Const VK_L = 76
Const VK_O = 79
Const KEYEVENTF_EXTENDEDKEY = &H1
Const KEYEVENTF_KEYUP = &H2
Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetForegroundWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Sub Form_Click()
'KPD-Team 2000
'URL: http://www.allapi.net/
'E-Mail: KPDTeam@Allapi.net
Dim hw As Long
hw = FindWindow(vbNullString, "cmd")
SetForegroundWindow hw
DoEvents
keybd_event VK_H, 0, 0, 0 ' press H
keybd_event VK_H, 0, KEYEVENTF_KEYUP, 0 ' release H
keybd_event VK_E, 0, 0, 0 ' press E
keybd_event VK_E, 0, KEYEVENTF_KEYUP, 0 ' release E
keybd_event VK_L, 0, 0, 0 ' press L
keybd_event VK_L, 0, KEYEVENTF_KEYUP, 0 ' release L
keybd_event VK_L, 0, 0, 0 ' press L
keybd_event VK_L, 0, KEYEVENTF_KEYUP, 0 ' release L
keybd_event VK_O, 0, 0, 0 ' press O
keybd_event VK_O, 0, KEYEVENTF_KEYUP, 0 ' release O
SetForegroundWindow Me.hwnd
End Sub
Сейчас этот форум просматривают: AhrefsBot и гости: 127