Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Scripts that I use with FastScripts to extend functionality in Mac OS X applications
branch: master

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.
Applications
MIT_LICENSE
Open Application's Scripting Dictionary.rb
README.md
Rakefile

README.md

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.

Installation

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://github.com/kch/mac-user-scripts.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.

Something went wrong with that request. Please try again.