Jump to content

Recommended Posts

Posted

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??

Posted (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 by Arez

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...