Hi all,
I've written a script for auto login wow, as the following shows:
Firstly, I want one more click since it's more reliable because the focus isn't always on account name
Second, I use ControlClick instead of MouseClick for it doesn't move mouse visibly.
Result: it just doesn't work. however MouseClick can work
Please give me some suggestions
Thanks
I've written a script for auto login wow, as the following shows:
#Include <Array.au3> #Include <WinAPIEx.au3> Local $PID = Run("E:\wow\wow.exe", "") Sleep(8000);25 seconds is a bit much... Local $Result = _WinAPI_EnumProcessWindows($PID) Local $hWnd = 0 If @error Then MsgBox(4096, "Error", "Cannot find process Window") Exit 1 EndIf If IsArray($Result) Then $hWnd = $Result[1][0] Else $hWnd = $Result EndIf Sleep(100) Local $rect = WinGetClientSize($hWnd) If $rect[0] = 0 or $rect[1] = 0 Then exit 1 EndIf Local $newx = $rect[0] * 0.5 Local $newy = $rect[1] * 0.525 WinActivate($hWnd) Opt("MouseCoordMode", 2) $click = ControlClick($hWnd, "", 0, "left", 4, $newx, $newy) MsgBox(4096,"click", $click) Sleep(100) ControlSend($hWnd, "", "", "test");Sends it to the game, wether your in game or not. Account name. Sleep(100) ControlSend($hWnd, "", "", "{TAB}");Moves down to the password field. Sleep(100) ControlSend($hWnd, "", "", "password");Sends it to the game, wether your in game or not. Sleep(100) ControlSend($hWnd, "", "", "{ENTER}");Moves down to the password field. Sleep(100)
Firstly, I want one more click since it's more reliable because the focus isn't always on account name
Second, I use ControlClick instead of MouseClick for it doesn't move mouse visibly.
Result: it just doesn't work. however MouseClick can work
Please give me some suggestions
Thanks