Re: Energy Saver/OS 10.2.2
Re: Energy Saver/OS 10.2.2
- Subject: Re: Energy Saver/OS 10.2.2
- From: "Marc S.A. Glasgow" <email@hidden>
- Date: Tue, 17 Dec 2002 02:03:00 -0500
Well, since last time I checked, preference panes aren't scriptable as
such, you can add a time-loop function to your script, so that it
verifies the time is in between two specific time periods and only runs
during that time:
-- returns complete date and time
set CurrentDate to the current date
-- returns time in seconds since midnight in your time zone set
CurrentTime to the time of CurrentDate
set StartHour to 7 -- 7am (put here to make it easy to change)
set StartHour to StartHour * 60 * 60 -- convert to seconds.
set EndHour to 22 -- 22:00 hours or 10pm
set EndHour to EndHour * 60 * 60 -- convert to seconds
if ((CurrentTime<StartHour) or (CurrentTime>EndHour)) then
-- it's not 7 am yet or it's after 10pm, then
-- quit the programs or do whatever
else
-- it is between 7 am and 10 pm
-- do your normal operations
end if
Best Wishes,
=-= Marc Glasgow
On Tuesday, December 17, 2002, at 01:00 AM,
email@hidden wrote:
I have an Applescript which works fine as long as Energy Saver has not
put my monitor to sleep. This is not the same as putting the computer
to sleep as then of course the script will not run. And it also runs
fine if the
screen saver is running.
Is there any way to control the Energy Saver system from Applescript?
Is there some way to wake up the monitor either by script or by some
program which I can set to come on at a specified time?
I really don't want to have the monitor on all the time, but I also
would like to have my applications run when I am not there.
The script is fairly simple in that it just starts three programs which
then access the internet. I could leave the programs running, but
since
one of them tries to access the internet every hour and I can't find
out
how to set it to only do the access when I tell it to, I would prefer
not to
have it running all night. Besides, I'm old-fashioned and think that I
ought to be able to run my computer the way I want to, and not as
someone else thinks I should. :)
Using a Cube, 17' flat screen, and OS X 10.2.2
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.