View Full Version : Where is the sleep timer plugin or file?
war_pig5
December 24th, 2002, 03:03 AM
The page http://www.girder.nl/developer.php lists a "tv-style sleep timer" plugin under Action Plugin numbers:
104 Timer (tv-style sleep timer) 1.0 Ron Bessems
However i can't seem to find it. maybe it doesn't exist. but then why would it have a version number? maybe it exists but is not released yet?
I looked in the downloads/plugins section and couldn't find it. Might it be listed under a different name?
In addition, i'll bet it could be built as a gml file, using other plugins.
can anyone steer me in the right direction?
sibix
December 25th, 2002, 10:48 AM
There is a plugin called Alarm Timer. You can use it for that purpose.
Just enter the time in ms (if you want to set the timer to 30 minutes, enter 30*60*1000=1800000) and point the On End to your Shutdown command.
war_pig5
December 25th, 2002, 10:36 PM
ok, i see wher this is going - i'm going to have to build it myself, and AlarmTimer is the key.
i'm imagining it working exactly like sleep the sleep button on my TV remote. that is:
press "sleep" button on remote: a 15 minute countdown timer appears (OSD). for each additional time the button is pressed, the timer increases by amother 15 minutes. when the timer >= 120 minutes, the countdown is cancelled. when the countdown = 0 minutes, the computer shuts down.
clearly i need to store time in a register.
each buttonpress will increment that register by 15, then display it (OSD is one thing i'll need that i've mastered).
a one minute AlarmTimer loop will decrement that register.
thank you, sibix, for nudging me in the direction of getting started.
sibix
December 26th, 2002, 01:04 PM
Well, I didn't think of such a comfortable Timer.
But as it's a good idea, I built a timer using the Alarm Timer plugin. It works exactly the way you explained, except that it uses seconds. Of course I had to put some additional features in it:
Time display - either last 10 seconds or always, can be combined with beep.
Voice countdown for the last 10 seconds if 'talking clock' files are installed.
sibix
December 26th, 2002, 01:16 PM
If the file from my last post doesn't work, try this one. I might accidentially have moved a command causing the timer not to reset properly.
war_pig5
January 1st, 2003, 06:20 AM
i played with the script a little:
1) modified events for streamzap remote and MS Internet Keyboard (be sure to disable the sleep key in windows before using :D )
2) all commands that are only necessary when the timer is running have been put into a subgroup "Timer Running". This subgroup is disabled by default and only enabled when the timer is running. in this way, the Timer Display and Timer Stop functions will run only when the timer is running. i made this modification because i like to use my "stop" button for things other than the sleep timer, and i didn't want the timer display (0:00:00 or "Timer DISABLED") to pop up errantly when i did that.
3) changed "calculate remaining time" lua script:
removed: force hours to 2 digits
added: if H(ours) or M(inutes) < 0 then set = 0
4) made sure all "timer==0" references were "timer<=0"
5) Disabled voice (i'd rather not have my computer chattering while i'm trying going to go to sleep :D )
6) shutdown uses girder poweroff command rather than an external group(which i don't have) to make this program more self-contained. shutdown is disabled by default for testing/saftey
7) misc restructuring and renaming
my modified script is attached below.
(old versions removed; see my later post)
sibix
January 1st, 2003, 10:33 AM
5) Disabled voice (i'd rather not have my computer chattering while i'm trying going to go to sleep )
I just included that to show that it's possible. It'll be a nice function if you assign a 'Launch Rocket' command. :D
6) shutdown uses girder poweroff command rather than an external group(which i don't have) to make this program more self-contained.
I used that because Girder's Poweroff sometimes causes problems on systems running Windows 2000/XP.
The script was supposed to provide a complete solution. Of course disabling features is easily possible to make it fit your needs.
war_pig5
January 1st, 2003, 05:40 PM
i found a bug in my version where shutdown was erroneously triggered when Timer > 2h. i fixed it by moving that command one step up in the Set Timer group. here's the new version:
war_pig5
January 4th, 2003, 04:35 AM
I used that because Girder's Poweroff sometimes causes problems on systems running Windows 2000/XP.
yes, you were right after all. Girder's Poweroff command worked during testing (doesn't it always?) but the first time i used it in a real-world situation, it closed most of the running programs but didn't shut down windows itself.
now i use the built-in WinXP shutdown command: O.S. | Execute | C:\WINDOWS\system32\shutdown.exe | -s -t 1
this shuts down windows with a 1 second delay (so that girder can finish its processing (namely the group disable)). which brings up a good point. in WinXP, at least, we could have just used execute commands to control the built-in delayed shutdown program. it wouldn't have been as slick and portable as this group currently is (and it couldn't be used to launch a rocket :wink: ), but it would have been a helluva lot easier to program! well, hindsight is 20/20. if there's interest, i might write that group. i wonder what percentage of us girder users are using WinXP.
note that i am using WinXP Pro (default configuration - ACPI enabled) and people with other configurations will need to use different shutdown programs or commands.
wctkdman
June 4th, 2003, 11:12 AM
Sorry to revive a dead topic, but where is the file you guys are speaking of? I am logged in but still can't see any liks to the file. Can anyone post a direct link to the file? Thanks.
gr8white
July 7th, 2003, 03:43 PM
Would war_pig5 or sibix be willing to share the gml for this timer?
wctkdman
July 7th, 2003, 06:00 PM
Found it: http://www.girder.nl/filesbb/files/timer_mod_318.zip
cheba
January 11th, 2004, 06:39 PM
AlarmTimer saves the timer value in reg12?
if not, where does is it saved?
I've tried to figure this out looking at the .gml but I couldn't
Thanks
Cheba
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.