Posts: 21
Threads: 4
Joined: Jul 2007
Hey, I havent used QM in a long time, so i'm messing around with it a little and I was wondering... how could i set up a macro to shutdown at like say 5:00 AM in the morning.
I know i need shutdown 3 but how do i get the time frame for it to shutdown to work?
Posts: 1,769
Threads: 410
Joined: Feb 2003
hit control-p and then click on schedule at the bottom left.
Posts: 21
Threads: 4
Joined: Jul 2007
ok thanks it works but im just curious... is there another way to do it other then schedule... like every night i wanna let my computer run to a certain time then shut off but it might not be the same time every night... so is there another way to set it up where i can adjust the time inside the macro rather then having to reset it all inside the properties?
Posts: 1,769
Threads: 410
Joined: Feb 2003
you could use a trigger but i dont recomend it.
if you put in this in just before the shutdown command it will wait for 10 min. you could do it that way.
Posts: 21
Threads: 4
Joined: Jul 2007
yea i was gonna do that but i was just gonna try something a little harder then that... before i had it:
str s
;top
s.time
out s
if s="8/1/2007 5:00:00 AM"
,shutdown 1
else
,goto top
,
but for the if part i dont like having to put the date... so is there some way i could fix that?
Posts: 1,769
Threads: 410
Joined: Feb 2003
if you look in the QM help under 'time' it gives the whole break down on how to use it.
Posts: 12,140
Threads: 142
Joined: Dec 2002
str s
rep
,s.time("-" "h:mm tt")
,out s
,if s="5:00 AM"
,,shutdown 1
,,end
,30
Posts: 21
Threads: 4
Joined: Jul 2007
Works great, thanks gin, and thanks ken.
Posts: 21
Threads: 4
Joined: Jul 2007
Hey one last question... Is there a way to set this up so I can set the time in another macro...
Set Time:
Shutdown Computer:
str s
rep
,s.time("-" "h:mm tt")
,out s
,if s="5:00 AM"
,,shutdown 1
,,end
,30
I want the Macro or Function "Set Time" to be able to adjust the time in the macro "Shutdown Computer" rather then setting the time in "Shutdown Computer". Any ideas on how this would work?... No biggie if not, I just wanted to see how cool I could set up this macro.
Posts: 331
Threads: 60
Joined: May 2006
Posts: 12,140
Threads: 142
Joined: Dec 2002
Or use registry.
Set Time:
str st
st="5:00 AM"
rset st "shutdown time"
Shutdown Computer:
str st
...
,rget st "shutdown time"
,if s=st
,,...
Posts: 21
Threads: 4
Joined: Jul 2007
OK i tried this but it didnt work?
Shutdown Computer:
str s
str+ st
rep
,s.time("-" "h:mm tt")
,out s
,if s=st
,,shutdown 1
,,end
,30
Set Time:
but this didnt work? any ideas why?[/code]
Posts: 21
Threads: 4
Joined: Jul 2007
Nevermind... I forgot to try saving it in registry... and now it works. Thanks Again.
Shutdown Computer:
str s
str st
rep
,s.time("-" "h:mm tt")
,out s
,rget st "shutdown time"
,if s=st
,,shutdown 1
,,end
,30
Set Time:
str st
st="1:00 PM"
rset st "shutdown time"
|