Scripts that I use with FastScripts to extend functionality in Mac OS X applications
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits ahead of kch:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Open Application's Scripting Dictionary.rb

These are scripts that I use with FastScripts to extend functionality in Mac OS X applications.

I'm writing a series of blogs about them. This is what I've got so far:

For a possibly more up-to-date list, see the fastscripts tag.


Ruby + rb-appscript

You need ruby 1.9 compiled as a universal binary, with rb-appscript installed. To check how your ruby is compiled:

$ file `which ruby`

If it doesn't say "universal binary", you need to build it yourself. Easiest is Homebrew:

$ brew install ruby --universal

To install rb-appscript:

$ gem install rb-appscript

If gem compilation fails and mentions homebrew-installed libxml2 or libsqlite3, try brew unlink sqlite libxml2 before gem installation. Afterwards, link them back with brew link sqlite libxml2.

Install these scripts

# preserve your old scripts, if any:
$ mv ~/Library/Scripts/ OldScripts

$ git clone git:// ~/Library/Scripts
$ cd ~/Library/Scripts/
$ rake

# now proceed to copy your old scripts from "OldScripts" back here

Configuring the script environment

Scripts ran through FastScripts won't inherit the environment set in "/etc/profile", "/.bashrc" or similar scripts. If you need to set some environment variables, like "PATH", you should use "/.MacOSX/environment.plist". Example:

$ cat ~/.MacOSX/environment.plist
	PATH = "/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin";

After editing the environment.plist file, you need to log out of your system account and log in again.