Sign in to follow this  
Followers 0
sandor555

Pause problem

5 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Please example (I speak little English).

Thanks :mellow:

Edited by sandor555

Share this post


Link to post
Share on other sites

I'm not your personal servant. If I find that I'm not the only person you've PMed I will lock this thread and remove you from this forum for awhile.

Share this post


Link to post
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

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