-1
我儘量讓自動鍵加壓,使最小化的遊戲客戶端爲我做的秩序,而我在其它事情(永恆之塔遊戲客戶端),但這裏沒有工作,工作是我使用,請告訴我什麼是錯的代碼它有毛病SendMessage函數API
Const WM_SETTEXT As Long = &HC
Const GW_CHILD As Long = 5
Declare Function GetWindow Lib "user32.dll" (ByVal hWnd As IntPtr, ByVal uCmd As Integer) As IntPtr
Declare Function FindWindow Lib "user32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As IntPtr 'Int32
Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (_
ByVal hWnd As IntPtr, _
ByVal wMsg As Int32, _
ByVal wParam As Int32, _
ByVal lParam As String) As Int32
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim hWnd1 As IntPtr = FindWindow("AIONClientWndClass1.0", "AION Client")
Dim hWndR2 As IntPtr = GetWindow(hWnd1, GW_CHILD)
SendMessage(hWndR2, WM_SETTEXT, 0, "h")
End Sub
這是代碼我用它必須在當我點擊Button1的遊戲展示窗口,但沒有發生
我使用Visual Studio 2013和Windows 10的64位
你想發送keypress密碼嗎? –
是的,我試圖做 –
,你是否在找到你的指針? (hWnd1和hWndR2) –