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 

If will soundbeep

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



Joined: 16 Jun 2007
Posts: 245

PostPosted: Mon Jan 21, 2008 8:20 pm    Post subject: If will soundbeep Reply with quote

I have 4 possibles, 1,2,3 or 4.
I want a script on the first run will detect what number I insert, then will beep number of time it detect the number represent.
then it will loop back to the top, then will detect again the number, but if it is the same number it will not beep.

ex: number detected is 2, he beep 2 time, sleep 1 minutes, then he detect the number 2 again, he dose not beep. 1 minute later number change to 4, he beep 4 times, then number back to 2, be beep 2 times. 1 minutes later number is 2 again, he dose not beep.

So far I make it beep all the time for the appropriate number, but when he detect it again he beep again.
Back to top
View user's profile Send private message
ahklerner



Joined: 26 Jun 2006
Posts: 1249
Location: USA

PostPosted: Mon Jan 21, 2008 10:30 pm    Post subject: Reply with quote

Code:
Loop {
   InputBox, Num, Select, The number   of beeps
   If !Num or (Num = OldNum)
      Continue
   OldNum := Num
   Loop %Num%
      SoundBeep
   }

_________________

ʞɔпɟ əɥʇ ʇɐɥʍ
Back to top
View user's profile Send private message
feejo



Joined: 16 Jun 2007
Posts: 245

PostPosted: Tue Jan 22, 2008 7:14 pm    Post subject: Reply with quote

can you explain to me that part please.

Code:
If !Num or (Num = OldNum)
      Continue
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   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