Hello lewisbates1991,
I wanted to get back to you on the sound issue. The best way I've found so far to keep the program running while the alarm is going is to use a wav file (assuming you're using Windows.) However, should you decide to have a different audioClip for each of your two alarms, there's a little trick you need to know about. If you try running two different audioClips in the same script, usually the first one will play and then you'll just hear sort of a "thunk" when the other one should have worked. Here's the script I use to overcome that problem:
Code: Select all
global soundCount
global soundList
on mouseUp
put 1 into gSoundCount
put "firstAlarm.wav, secondAlarm.wav" into gSoundList
The two global variables should be placed under the global variables I put in the original timer script I sent, and then the first two lines of script under the "on mouseUp" handler should be placed right under the "on mouseUp" of the original script.
In this example, I have two .wav file examples, but you can obviously rename them to the names of your own sound files of alarms. There's a lot of sources for such sound files, and certainly a big source is the online Microsoft office clipart site. Keep in mind, however, most sound files you download, even with a .wav extension are not usually the real thing. The best bet is to also download the free sound file converter program from "Audacity" and convert any audioClip to a true .wav format that Revolution can use.
As for keeping an alarm running the entire duration between the 2 minute and five minute settings, which I think is what you want, as long as you know the time duration of your .wav file, you can simply make it repeat for as long as you need. For example, if I wanted the first alarm to loop for three minutes and I knew the audioClip itself was exactly 5 seconds long, I'd probably tell it to repeat for (36) times. There might be a better way but this is just off the top of my head. By the way, when the second audioClip is activated, it should stop the first alarm the moment it goes into the second alarm, unless you write script that specifically tells it to wait until the first alarm is finished.
Here's another thought: You might want to save your stack as a palette with script such as the following:
Code: Select all
on preOpenCard
save stack "fiveMinuteTimer" as palette
end preOpenCard
There's a number of ways you can turn a stack into a palette, but however you do it, once it's a palette it will float above your other stacks so it will be accessible for use. You also have to reset it to "topLevel" before you can edit it again after turning it into a palette.
Anyway, I hope all this helps. Now I need to go to the website that Malte pointed you toward and learn about that better way, too.
Cheers, deeverd