--- In [email protected], "quantiworks" <[EMAIL PROTECTED]> wrote:
> wait.activity (i added this because when i unlocked the timer was
> still running)
Having a wait in there doesn't impact the timer. If the timer has a
reset interval, I expect it will be counting down again despite having
the current iteration's action waiting.
> if(win.getdesktopname == "Default")
> timer.set("+e 0 30 0")
>
> but today i had my music player running and the above timer was
> always running when i unlocked, is it because of track changes?
>
> anyway, i changed the timer and removed the if statement and it's
> working as i wanted. now, like i said early, i'd also like to
> improve the messagebox method given by Sheri but i need your help
> one more time i don't know how to deal with if/else statements.
>
> here's the idea:
>
> >action
> messagebox("yesno question" , "lock workstation now?")
You will need to track the answer, e.g.,
global lockdownanswer=messagebox("yesno question" , "lock workstation
now?")
*Script If (lockdownanswer==6) do
*Shutdown LockWorkStation noconfirm
timer.set("+e 0 30 0")
else
timer.set("+e 0 5 0")
endif
I'll look at the workrave stuff later, but you could easily also have
a bar button show you the e countdown time, and button actions that
reset the e timer, lock immediately, etc.
In a separate timer (running on a frequent reset interval) the
following reset action:
*Script if (win.getdesktopname == "")
timer.set("+e 0 30 0")
Regards,
Sheri