Sign in to follow this  
Followers 0
Arez

Quitme won't work

3 posts in this topic

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

Share this post


Link to post
Share on other sites



thats because you have the number-lock on

press number lock ( to release it ) then it will work

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

#3 ·  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

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0