Jump to content

shut down


10 posts in this topic

Recommended Posts

well, in i cal, for the alarm for the event, i can choose "run script"

 

i'd like to ask pollitely to someone if he can make an apple script, that shuts down the mac, so i can set as an alarm and the mac shuts down automaticly

 

and also expaln me how to set it, coz i know there are preinstalled scripts but in the run script menu none is shown, so where i put??

 

thanks :)

Link to comment
Share on other sites

wow, thx ^_^

 

now, would you be kndly enough to explain this newbie how to add to that same script, before it click shut downs, an application close?

 

coz when it clicks shut down, the application stand there and say, do you really want to quit? "cancel" "quit". so it doesnt shut down :thumbsup_anim:

 

and i've already realized to ical alarm :D

 

thanks in advanced

 

PS: does the colour and thickness of the font have anything to do with the script??

Link to comment
Share on other sites

You'll need to place a tell block before the first line of that script:

 

Tell Application "Blah" to quit

 

Put your application instead of Blah within the quotes (the quotes are important, so don't forget it). The issue would then become whether or not the application will continuously change (in which case, you can't use a script for it), or if it will remain constant (and then the script will work)

Link to comment
Share on other sites

it worked, except for this

 

when its going to quit, a dialog box appears: picture1nq2.png

 

how can i make that it press "quit"

 

tell dialog box

click "quit"??

 

D:!

 

PS: would be nice a tutorial with the meaning of the commands, and stuff, like

 

menu bar # : chooses a manu bar from te upper bar, or stuff like that ...

Link to comment
Share on other sites

Why not set your Energy Saver to shut down your comp.

 

Goto System Prefrences->Energy Saver->Schedule

 

Also most apps have a setting, if you want then to confirm before quit

Link to comment
Share on other sites

  • 8 months later...
it worked, except for this

 

when its going to quit, a dialog box appears: picture1nq2.png

 

how can i make that it press "quit"

 

tell dialog box

click "quit"??

 

D:!

 

PS: would be nice a tutorial with the meaning of the commands, and stuff, like

 

menu bar # : chooses a manu bar from te upper bar, or stuff like that ...

You are lazy guy, shutdown script is on apple site and he close all programs (force quit) before shutdown, you can save any script as ical plugin

http://www.apple.com/downloads/macosx/auto...r/shutdown.html

Link to comment
Share on other sites

  • 8 months later...

Probable not the best way to do this, but the only way I can get to work.

tell application "System Events"
set processList to every process

repeat with i from 1 to (number of items in processList)
	set thisProcess to item i of processList
	if thisProcess is not background only and name of thisProcess is not "Finder" and name of thisProcess is not (name of me) then
		try
			do shell script ("killall " & (name of thisProcess as string))
		end try
	end if
end repeat
end tell

tell application "Finder" to shut down

Link to comment
Share on other sites

 Share

×
×
  • Create New...