Ask TUAW: AppleScripting coolness
It's Tuesday Wednesday, which means it's time for Ask TUAW Video Edition. We've gotten great comments and questions coming in, and we have been trying to get to them all. Some of them are just too hard to show in a video format such as Ask TUAW, so today I have decided to do a little AppleScript "tutorial."
Here are 4 scripts that I use:
- iTunes - this script will automatically play/pause my music
- I'm back - will automatically make Adium go available, and start my music
- Mail Announce - will announce who incoming mail is from (works with mail.app only)
- Tell me a joke - tells a random joke
You can download the scripts here. Updated the download link at 5:30pm EST
As always leave us comments below or email us here.
Share
Source: http://tuaw.com/tag/asktuaw
Categories
It's Tuesday Wednesday, which means it's time for Ask TUAW Video Edition. We've gotten great comments and questions coming in, and we...
Add a Comment
Justin. How can I attach the iTunes pause to a keystroke?
April 28 2011 at 11:31 AM Report abuse Permalink rate up rate down ReplyMark - you mean the iTunes script?
Use the keyboard system preference.
Directions are convoluted, but here: http://macdevcenter.com/mac/2007/06/08/hit-and-run-launching-applescripts-with-keyboard-shortcuts.html
Had a look at Apple Script for the first time a few days ago but it went way over my head.
Just watched your video and now have Alex telling me I've new mail!
Thanks so much for this, you've given me the confidence to have another look at AppleScript!
PS: What screencast software are you using? Need to do some similar stuff soon and no idea what to use.
Glad we got you back into it!!!
For screencasting we use ScreenFlow - it allows us to record the screen, myself and use my external mic to record my audio.
I haven't used scripting since using Aspect on PcPlus WAY back when, and have totally overlooked AppleScript.
Rolling up my sleeves.
Thanks, man!
Got it!
"To contains @"
Thanks!
That works also.
Trick - if you use iVox you can use the editor to speak specific ways a certain way. So when my mother emails me from her aol account - it doesn't say her email address out loud, but does say her name. I set up the editor to say that momemail@aol.com is pronounced a certain way. :)
Justin,
Just how does one set a rule for ALL incoming mail, regardless of recipient?
I am on mailing lists where my address is hidden.
Feeling stupid here.
Jeff - depending on your version of Mail it might be different - but for me (on 10.6.7) I have it set to:
If ANY of the following conditions are met:
Account AccountName
Run AppleScript Location of Script
that help?
Anyone have a working script that deletes movies and TV Shows that in iTunes is marked as watched? Both the file in iTunes and the file on the harddrive should be deleted.
April 27 2011 at 2:30 PM Report abuse Permalink rate up rate down ReplyI love Apple Scripts. It was one of the best moves Apple made putting them back in AND giving them acess to the Accessible Items that vision or hearing support uses. In short anything you can tell the OS to do by voice command Apple Script can do as well.
I use UI Browser http://pfiddlesoft.com/uibrowser/ to find what elements of the OS or program is scriptable. Safari renders web pages in UI friendly so it can often be scripted for example.
I have been trying to find something for a while now... My itunes library lives on a mac mini and plays to airport express speakers around my house.
I use the iOS remote app to control this.
Can i control it from my macbook? I do sometimes use the inbuilt OSX screensharing to get in but this is a bit of a hassle as the mini is also running plex so I have to close that to find itunes and pick a song.
Basically I'm after the iOS remote app for mac! the ability to choose airplay speakers is essential!
Thanks,
Andy
Neither iTunes, nor mailannounce, nor I'm back.
The joke one works (sorry, I failed to try that one before posting).
When I click run, nothing happens.
Jeff -
itunes - will only work if iTunes is running. Launch iTunes - be on your music section and have it playing - then run the script - it will pause your iTunes.
MailAnnounce - it has to be loaded into mail.app - Add it as a rule that on all incoming mail to run script "mailannounce"
I'm back - only works with Adium - you can change it to iChat if you want.
Hope this helps.
Apple has multiple voices on its OS, is there a way to chose which voice speaks?
April 27 2011 at 1:26 PM Report abuse Permalink rate up rate down ReplyDeals of the Day
more deals- StarCraft II: Wings of Liberty for PC and Mac for $30 + pickup at Best Buy
- Apple iPhone 4 8GB for Verizon, AT&T, or Sprint for $50 + pickup at Best Buy
- Unlocked iPhone 4S 16GB for GSM (AT&T, T-Mobile) for $619 + free shipping
- Apple iMac Core i7 Quad 3.4GHz 27" w/ 24GB RAM, 2TB HDD for $2,677 + $29 s&h
- Used Apple Magic Mouse for $36 + $4 s&h
- 9-Piece iPhone Bundle, includes 1,900mAh battery for $8 + free shipping
21 Comments