Jump to content

Pause problem


Recommended Posts

Hello!

how to pause the button6?

While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button6
    while 1
Sleep(700)
send("1")
Sleep(1000)
Send("2")
Sleep(1000)
Send("3")
Sleep(1000)
Send("4")
Sleep(1000)
Send("5")
Sleep(1000)
wend
case $button7

EndSwitch
WEnd
Edited by sandor555
Link to comment
Share on other sites

Don't get into loops that don't check GuiGetMsg() anymore, it's a trap. Once you click $button6 above, you're stuck in that loop forever.

You can do your GUI in event mode, or add a HotKeySet() to change a flag that exits the loop, or do everything in one loop so GuiGetMsg() still gets checked, etc.

Depends on what you feel up to.

:mellow:

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Please example (I speak little English).

Experiment with the example script in the help file under HotKeySet(), it specifically shows a 'pause' functionality.

:mellow:

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...