Arez Posted July 25, 2006 Posted July 25, 2006 My problem is that I set the Auto-It program to terminate when I press 'end' on numpad, but never does. here is my code: If WinExists ("Brood War") Then WinActivate ("Brood War") WinWaitActive ("Brood War") $WinPos = WinGetPos ("Brood War") HotKeySet("{NumPadAdd}","getpos") HotKeySet("{END}","quitme") While 1 MouseClick("left", 51, 334, 2, 2.5) Sleep(3000) MouseClick("left", 51, 334, 2, 2.5) WEnd Else MsgBox(64, "Information", "Brood War must be running.") Exit EndIf Func Close() EndFunc func quitme() exit EndFunc what is wrong??
Valuater Posted July 25, 2006 Posted July 25, 2006 thats because you have the number-lock on press number lock ( to release it ) then it will work 8)
Arez Posted July 25, 2006 Author Posted July 25, 2006 (edited) here is one that works: HotKeySet("{NumPadAdd}","getpos") HotKeySet("{END}","quitme") While 1 Sleep(1000) WEnd Func getpos() Local $pos = MouseGetPos(), $x = $pos[0], $y = $pos[1] Msgbox(0,'',$x & " <-X COORD Y Coord->" & $y) EndFunc func quitme() exit EndFunc I just want my program I first posted to be able to end like this. also, numlock being on or off has no effect either way. Edited July 25, 2006 by Arez
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now