Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Possible causes of a self-waking Mac' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Possible causes of a self-waking Mac
Authored by: johnsawyercjs on Mar 15, '08 02:10:10AM
Having given myself an idea, I wrote the script myself, to keep putting a Mac to sleep whenever it wakes itself up:

repeat
	tell application "Finder"
		display dialog "Cancel sleep? (auto-sleep after 15 seconds)" buttons {"Cancel", "Sleep"} default button 1 giving up after 15
		set the button_pressed to the button returned of the result
		if the button_pressed is "" or the button_pressed is "Sleep" then
			tell application "Finder" to sleep
		end if
	end tell
end repeat
I'm sure this is crude, and may not work on everyone's setup, but it worked on my MDD. However, if your Mac keeps waking itself up seconds or minutes after EVERY time it goes to sleep, this script won't be of much use. Paste the script into Script Editor, and save it as an application bundle, using Script Editor's "Stay Open" option, then run the app whenever you want the Mac to go to sleep. Of course, you can change the timeout to whatever you want.

[ Reply to This | # ]
Possible causes of a self-waking Mac
Authored by: johnsawyercjs on Mar 15, '08 02:17:31AM

Oops--don't save that script using Script Editor's "Stay Open" option, or else the app will stay running even after you click its "Cancel" button, but it won't do anything after that until you quit from it and re-launch it. Without the "Stay Open" option, it will quit if you click its "Cancel" button, and then you just have to re-launch it to activate it again, which is the desired behavior.



[ Reply to This | # ]