Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

groovebuster

macrumors 65816
Original poster
Jan 22, 2002
1,250
101
3rd rock from the sun...
Hi!

Maybe one fellow can help me with this?

I finally abandoned my "real" fax machine from my Home-Office since it started to act weirdly and I don't feel like replacing it by a new one.

So I configured my Office-Mac (a Quicksilver) to wake from deepsleep automatically when a fax call is coming in and to receive the fax, followed by sending an e-mail to my business e-mail account with a PDF of the fax attached. It's pretty cool because now I can receive a fax all the time no matter where (!) I am, as long as I have internet access.

BUT...

I want the computer to go to deepsleep again after I received a fax.

The system allows to shut down automatically after a certain time without any activity. I could set the time to something like 15 minutes, but that doesn't make sense. The machine would go to deepsleep a few times a day when I have a little break, and I don't want that (the annoyance factor ;) ).

Is there a way to tell the Mac "If you received a fax that woke you from deepsleep, then go to deepsleep again after 5 minutes"?

Keep in mind that I don't want the computer to go to deepsleep after a fax when I am already working with it anyway. It is only supposed to happen when the computer wasn't on already...

Any ideas? AppleScript?

I am pretty sure it can be done... I just don't have a good idea so far how...

Thanks in advance.

groovebuster
 

Eniregnat

macrumors 68000
Jan 22, 2003
1,841
1
In your head.
The manual way is the easiest. It is an annoyance, I agree. But think about it, we are complaining about 4 mouse clicks. Doc (Click System Preferences, Click Energy Saver, Click and drag Sleep, Click close System Preferences). It reminds me of Jetsons when George states, "These 4 hour work weeks are killing me!" as he sits in front of his one button computer.

Than aside, I would be asking the same question.
I have had a hard time scripting the preferences. You could create a script 2 scripts. One called "Away" so that your computer sleeps quickly. The other will be called "Working" so that your computer sleeps only after 15 minutes. You still have to activate the scripts manually, but hey, it will be only one action instead of 4.

You can'y autoscript (at least with Panther) System Prefrences.
Here's what your start should look like, less indents.

tell application
"System Preferences"
activate
set current pane to pane
"com.apple.preference.energysaver"
end tell


Now for the slider, I can't help you there yet. But at least I helped you open System Prefrences and find the Energy Saver pain. You can't autorecord "protected" functions. If you find an answer for the slider post it.

I'll futz around with this idea later on this week or next.
 

rainman::|:|

macrumors 603
Feb 2, 2002
5,438
2
iowa
He can't do a manual sleep if he's not there-- he's talking about doing this unattended, his Mac completing the process and returning to sleep while he's away.

Unfortunately, unless Eniregnat or someone comes up with something quickly, the answer is no. I've been hoping for years now that someone would release sleep management software, I would really love it if Sleep behavior would be different at different times of the day... If the cat steps on the keyboard at 3AM, it should return to sleep within 5 minutes, but when I'm working in the daytime, it should be 1 hour. I know it's pretty anal to worry about, but this machine won't last forever, and it shouldn't be awake when no one's here.
 

Eniregnat

macrumors 68000
Jan 22, 2003
1,841
1
In your head.
rainman::|:| said:
He can't do a manual sleep if he's not there-- he's talking about doing this unattended, his Mac completing the process and returning to sleep while he's away.

I know that. What I was stating is that he could create two scripts. One that sets the sleep time to 1 minute when he plans to leave. The other when he is working would set the value to 15 minutes. It is possible to have AppleScript detect programs opening and closing, but hey that's why professional AppleScripter's get 150$ and hour. If he can write these two scripts, he can then combine them to create an auto detect with an if/then else that use one of the two sets of previously created code.

Back on track, I am working on setting the slider, I am looking for its name in the System Prefs. Dictionary.
 

Eniregnat

macrumors 68000
Jan 22, 2003
1,841
1
In your head.
groovebuster said:
Keep in mind that I don't want the computer to go to deepsleep after a fax when I am already working with it anyway. It is only supposed to happen when the computer wasn't on already...
groovebuster

If you can auto detect the program opening and closeing, then you would still have to disable the script when your working. The solution stated above would work best. You would run the "I'm at work" script when you started working, and run the "I'm not here" script when your away.

Perhaps you should (or me) post something on AppleScript.net.

I think I have an answer to your problem. Will post tommarow.
 

groovebuster

macrumors 65816
Original poster
Jan 22, 2002
1,250
101
3rd rock from the sun...
Thanks for the replies so far...

I am very busy the last few days, so I didn't have time to get deeper into the subject for now.

I'll keep you updated when I have time again and found a vaild solution to my little "problem"! :)

Regards,

groovebuster
 

groovebuster

macrumors 65816
Original poster
Jan 22, 2002
1,250
101
3rd rock from the sun...
Eniregnat said:
... but hey that's why professional AppleScripter's get 150$ and hour.
Maybe I should specialize in AppleScript then. 150$/h doesn't sound too shabby. I didn't realize there was a real market for it. I always thought the projects involving AppleScript are so rare that it doesn't make sense to go into that direction...?

But maybe it is different in the US. Here in Germany I probably would starve... even if I would get 150$/h. Or maybe not? I really have to do research on that, I would like a change anyway. Doing the same stuff for too long becomes boring...

groovebuster
 

maxterpiece

macrumors 6502a
Mar 5, 2003
729
0
maybe just create an "away" user account. Switch to that user when you're away and have energy saver settings to go to sleep really quickly on the away account. With fast user switching that's a pretty simple thing to do.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.