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

Gambuchi

macrumors member
Original poster
Nov 15, 2003
51
0
Oregon
Why won't the following rule in mail (I've included the script file, the apple mail rule and my system config) work... I can send the mail to myself, it arrives and sits in the inbox but for whatever reason does not execute the rule which calls the applescript... If I run the script outside of mail, it works perfectly... HELP.
 

Attachments

  • Picture 1.jpg
    Picture 1.jpg
    26.4 KB · Views: 93
  • Picture 2.jpg
    Picture 2.jpg
    11 KB · Views: 90
  • Picture 3.jpg
    Picture 3.jpg
    44.4 KB · Views: 54
  • Picture 4.jpg
    Picture 4.jpg
    31.4 KB · Views: 47
I see no problem with that script you wrote and it seems to work fine for me (12" PowerBook). Alternatively, you could try a more explicit version of the same script:

Code:
tell application "Finder"
	set tempVar to display dialog "This computer will go to sleep in 1 minute unless cancelled." buttons {"Sleep", "Cancel"} default button "Cancel" giving up after 60
	set buttonReturned to button returned of tempVar
	set givenUp to gave up of tempVar
	
	if buttonReturned is "Sleep" then
		sleep
	else if givenUp is true then
		sleep
	else
		return
	end if
end tell
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.