Help - Search - Members - Calendar
Full Version: shut down
InsanelyMac Forum > Apple World > Mac Programming and Development > AppleScript and Automator
Pantalaimon
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 smile.gif
A Nonny Moose
Here is the script you need. I've never messed with iCal alarms before, so I'm not sure if you need to make it an application or even do something else with it.
Pantalaimon
wow, thx smile.gif

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 sad.gif

and i've already realized to ical alarm biggrin.gif

thanks in advanced

PS: does the colour and thickness of the font have anything to do with the script??
A Nonny Moose
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)
Pantalaimon
it worked, except for this

when its going to quit, a dialog box appears:

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 ...
A Nonny Moose
that has no bearing on the script as much as it has on not shutting down the downloads before shutting down. Nothing can change that.
U.C.
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
Pantalaimon
QUOTE (Unstable Connection @ Jul 19 2006, 09:10 AM) *
Also most apps have a setting, if you want then to confirm before quit


i wanna kill myself.....

but thanks
alicheusz
QUOTE (Pantalaimon @ Jul 16 2006, 11:23 PM) *
it worked, except for this

when its going to quit, a dialog box appears:

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
thePixeler
Probable not the best way to do this, but the only way I can get to work.
CODE
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
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.