Page 1 of 1

Using timer and counter functionality

Posted: Fri May 26, 2006 7:07 pm
by eddu
LS;
I looked around for some info on how to apply timer and counter functionality. The goal is simple, building a alarm clock for cooking.
Can anyone get me going?

Regards;
Ed

Posted: Fri May 26, 2006 8:56 pm
by Mark
Here is one possibility:

on mouseUp
if the hilite of me is false then
set the hilite of me to true
send "ringTheBell" to me in 5 seconds
else
set the hilite of me to false
end if
end mouseUp

on ringTheBell
if the hilite of me is true then
beep
send "ringTheBell" to me in 1 seconds
end if
end ringTheBell


Put this script into a button and set the autoHilite of that button to false.

Best,

Mark

Posted: Sun May 28, 2006 6:24 pm
by eddu
Maybe my question was not quite clear. What I try to find out is typical time-functionality. I can use some help on this item.

Regards;
Ed
[/i]

Posted: Sun May 28, 2006 6:41 pm
by Mark
Ed,

What is "typical time-functionality"? The script I wrote you is a perfect alarm clock, although you might want to play a different sound. What else are you looking for?

Best,

Mark

Posted: Mon May 29, 2006 4:21 pm
by eddu
Mark;

I gave your idea a closer look. I'm shure it works!

Ed