Hi,
I am new on the list, though i have been using MH with some simple scripts for
over a year.
Could someone please explain the code below, as I have been unable to adapt it
for my own use.
>Something like this should work, assuming you wanted code to do something
>just once shortly before a timer expires:
>if (seconds_remaining_now $Timer < 10 and !$Timer->{expire_warning_flag) {
>$Timer->{expire_warning_flag} = 1;
>...
>}
>if (expired $Timer) {
>$Timer->{expired_warning_flag} = 0;
>...
>}
>
>I just made up the name expired_warning_flag and stored it in the Timer
>object, since it was handy.
I basically want an annoucement to be made 2 mins before the following code is
run.
if ( expired $study_motion_timer ) {
set $study_motion 'off';
set $study_switch OFF;
}
Thanks
Shola
|