AutoHotkey Community

It is currently May 27th, 2012, 10:54 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Help with timers!
PostPosted: November 14th, 2006, 4:47 pm 
Offline

Joined: November 14th, 2006, 4:40 pm
Posts: 16
Hello, and thank you for this wonderful application! I'm trying to do a simple countdown time that plays a warning after 10minutes you have pressed a button. And if you press that button within the time it will reset the timer.

This is what I have come up with so far:
Code:
#x::
10mWarning:
SoundPlay, %A_WinDir%\Media\ding.wav
Return

#Persistent
SetTimer, 10mWarning, 10000
Return

I use 10000ms for testing.
But when I press win+x the sound plays instantly instead of 10s. What am I doing wrong?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 14th, 2006, 4:53 pm 
Code:
#Persistent
#x::
   SetTimer, 10mWarning, 10000
   Return

   10mWarning:
   SoundPlay, %A_WinDir%\Media\ding.wav
   Return

#y::SetTimer, 10mWarning, Off
Not what you've requested I guess :roll:


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 14th, 2006, 4:57 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
BoBo, I assume you did it correct. I understood the question the same way. But the #persistent isn't needed, since it will be persistent automatically due to the hotkeys.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 14th, 2006, 5:15 pm 
Offline

Joined: November 14th, 2006, 4:40 pm
Posts: 16
Ok.. Thank you!
what you posted wasn't exactly what I was looking for but it helped me on the right way, and I got working now like wanted.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 14th, 2006, 5:45 pm 
Quote:
and I got working now like wanted
So would you mind to show us your outcome? I' (and toralf too) m(ight be) interested what you've accomplished. :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: November 14th, 2006, 6:09 pm 
Offline

Joined: November 14th, 2006, 4:40 pm
Posts: 16
BoBo wrote:
Quote:
and I got working now like wanted
So would you mind to show us your outcome? I' (and toralf too) m(ight be) interested what you've accomplished. :)

Sure :P
Code:
#x::
   SetTimer, 10mWarning, 600000
   Return

   10mWarning:
   SoundPlay, %A_WinDir%\Media\ding.wav
   SetTimer, 10mWarning, Off
Return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 14th, 2006, 7:17 pm 
Thx. 8)


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Google Feedfetcher, HotkeyStick, Yahoo [Bot] and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group