Sign in to follow this  
Followers 0
Death

Start Stop A Loop?

3 posts in this topic

When i push "Home" i want it to do the function home until "End" is Pushed.

HotKeySet("{HOME}", "Start")
HotKeySet("{END}", "Stop")

MsgBox(4096, "Instructions", "Hover Mouse Over Drop Gold Hit Home To Drop", 10)

While 1
    Sleep(100)
WEnd

Func Start()
    MouseClick("Left")
    Sleep(50)
    Send("1")
    Sleep(50)
    Send("{ENTER}")
    Sleep(50)
EndFunc

Func Stop()
    Exit
EndFunc

I was going to try

Func Start()
While 1
    MouseClick("Left")
    Sleep(50)
    Send("1")
    Sleep(50)
    Send("{ENTER}")
    Sleep(50)
WEnd
EndFunc

But the program will have to exit to stop it, Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You could do:

HotKeySet("{HOME}", "Start")
HotKeySet("{END}", "Stop")
Global $Go

MsgBox(4096, "Instructions", "Hover Mouse Over Drop Gold Hit Home To Drop", 10)

While 1
    While $Go = 1
           MouseClick("Left")
           Sleep(50)
           Send("1")
           Sleep(50)
           Send("{ENTER}")
           Sleep(50)
   WEnd
  Sleep(100)
WEnd

Func Start()
    $Go = 1
EndFunc

Func Stop()
    $Go = 0
EndFunc
Edited by =sinister=

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

You could do:

HotKeySet("{HOME}", "Start")
HotKeySet("{END}", "Stop")
Global $Go

MsgBox(4096, "Instructions", "Hover Mouse Over Drop Gold Hit Home To Drop", 10)

While 1
    While $Go = 1
           MouseClick("Left")
           Sleep(50)
           Send("1")
           Sleep(50)
           Send("{ENTER}")
           Sleep(50)
   WEnd
  Sleep(100)
WEnd

Func Start()
    $Go = 1
EndFunc

Func Stop()
    $Go = 0
EndFunc
Trying This.

Edit: Works Fine, Thanks.

Edited by Death

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