Jump to content
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
https://www.insanelymac.com/forum/topic/22026-shut-down/
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
https://www.insanelymac.com/forum/topic/22026-shut-down/#findComment-145841
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
https://www.insanelymac.com/forum/topic/22026-shut-down/#findComment-145889
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
https://www.insanelymac.com/forum/topic/22026-shut-down/#findComment-145969
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
https://www.insanelymac.com/forum/topic/22026-shut-down/#findComment-332988
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
https://www.insanelymac.com/forum/topic/22026-shut-down/#findComment-529438
Share on other sites

×
×
  • Create New...