Skip to content

A nice little Applescript for ya

June 6, 2010

In an attempt to make my morning wake-up alarm more automated and for it to play my iTunes music, I created a small little applescript. It ensures that the volume is high enough (you can change these values to whatever you like), and it even has the computer literally say good morning to me.

Here it is:

set volume 6

say “Wake up, Connor!”

tell application “iTunes”

set sound volume to 60

play playlist “Cut Copy Radio”

end tell

To finalize everything, you must create an event for however frequently you like by doing File->New Event, then making sure that as the alarm you tell it to run the script file that you just created. Once that is done go into System Preferences->Energy Saver, and under “Schedule…” make sure that you have you computer wake before the time that you have the script scheduled, otherwise your computer will be asleep and not have a change to actually execute your script (sometimes this takes a bit of experimentation to get the timing and everything to be just perfect).

I will probably be making some Applescript tutorial videos soon explaining some more complicated functionality of Applescript, so that you may automate your computer more.

Advertisements

From → regular

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: