AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

A hotkey to Pause a loop and Unpause it doesn't work.. why?

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
bbint



Joined: 17 Sep 2008
Posts: 19

PostPosted: Sun Jul 19, 2009 6:36 pm    Post subject: A hotkey to Pause a loop and Unpause it doesn't work.. why? Reply with quote

Code:

1::
Loop 30 ; I'm plan on viewing 30 power point slides hands-free
{
sleep 50000 ; I give myself 50 seconds to view the slide
send {PgDn} ; it automatically moves to the next slide after the 50 seconds
}

Code:

Esc:: ; If I don’t understand the slide, I want to …
Send {PgUp} ; … go back to the previous slide, because I need extra time to view it
Sleep 500
Pause ; I Pause to stop the {PgDn} loop above
Sleep 50000 ; I give myself 50 seconds to view the slide again
Pause ; I want to unpause so that I can resume the {PgDn} loop above.. this doesn’t work
Return

Code:

Esc::
Send {PgUp}
Sleep 500
Pause ; After this pause, it stays paused, and it doesn't reach the 2nd Pause that’s supposed to unpause it
; What can I do to unpause it so that I can resume the {PgDn} loop
Sleep 50000
Pause
Return

Code:

2::Pause
; I have to press 2 to unpause
; However, after I unpause …

Code:

Esc:
Send {PgUp}
Sleep 500
Pause ;
Sleep 50000
Pause ; … This pause will now execute.. I then have to press 2 again to unpause it.. After I unpause it, the {PgDn} loop will finally continue
Return

I don’t want to have to touch the keyboard to unpause and resume the {PgDn} loop
How would I do that?

Thanks for any info that you can offer
Back to top
View user's profile Send private message
Tuncay



Joined: 07 Nov 2006
Posts: 1886
Location: Germany

PostPosted: Sun Jul 19, 2009 6:47 pm    Post subject: Reply with quote

Quote:
A hotkey to Pause a loop and Unpause

Quote:
I don’t want to have to touch the keyboard to unpause and resume the {PgDn} loop
How would I do that?

You need a hotkey but you dont want to touch the keyboard??
Why do you add manually pause, if you want doing it with a hotkey?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group