Useful AppleScripts

How to use these applications:

  1. Start up Script Editor (/Applications/Utilities/Mac/AppleScript/Script Editor.app).
  2. Open the script or paste in the text.
  3. File > Save As... > File Format > Application > Save.

In order for most of these to work, you will need to turn on a setting in System Preferences. Go to Universal Access and check the box that says "Enable access for assistive devices".

I use Spark constantly. It runs in the background enabling you to use keyboard shortcuts to run AppleScripts, open documents, and even write prewritten text as if you were typing it.

Create A New Text File in Finder
For both Unix and Windows users, it really seems obvious to have an option in the context menu to create a new text file in the current Finder directory. This will do you one better! It will touch (create) the file and open it directly for you.

Touch the Highlighted Document or Directory in Finder
If you organize things like I do using column view in Finder arranged by Date Modified, this script will be incredibly useful to you. It makes navigating

Toggle AirPort
Turning AirPort on and off all the time using the mouse gets to be a pain.

Toggle Caffeine
Turning Caffeine on and off all the time using the mouse gets to be a pain.

Rename All Files In A Directory
This does just what it says. Choose a directory & a new file name, and each of the files in the directory will be renamed with a postfix of incremented numbers.

Ghost Typing
A quick way to insert text that you commonly type (like your email address) as long as it's ASCII.

Move Windows Around
Move your windows to the edges and center of your screen using keyboard shortcuts.

Resize Windows
Resize your windows using keyboard shortcuts.

Copy Unicode to the Clipboard
For inserting text you commonly type that includes Unicode.