You are currently browsing the archives for the "applescript" tag.

Move over AppleScript, here comes Ruby!
Tuesday April 24th 2007, 8:07 pm
By Theron Parlin
Tags: RubyOSA, applescript, programming, ruby, scripting

rubyosa.jpg

RubyOSA provides a bridge from Ruby to the Apple Event Manager. It allows Ruby programs to automate Mac OS X applications in the same way as AppleScript. This is especially neat because it opens the door for developers to write web applications with Ruby on Rails that could include some integration with the Mac (perhaps pulling song lists from an iTunes library and importing them into a web application’s database). I’m sure there’s plenty of opportunities for integration.


Applescript to minimize all application and finder windows
Monday April 23rd 2007, 1:53 am
By Theron Parlin
Tags: Software, applescript, minimize

I created an applescript, Minimize, that will minimize all application and finder windows. The best way to use it is to assign a Quicksilver trigger to it. Do so by calling it via osascript and run it in a shell.

  1. Open Quicksilver, then type (command-’) to open the custom triggers section
  2. Add a new command by clicking the plus sign at the bottom of the window
  3. Type . (dot) to put it into edit mode
  4. Type ‘osascript /path/to/minimize.scpt’
  5. Hit tab and choose “run command in shell.”
  6. Assign a trigger to it (I use shift-command-w)

trigger.jpg

Download Minimize (right click, save link as)

Note: If you don’t want to do this using an applescript, you can do the same thing with a couple of extra steps: command-tab to the finder, then hit option-command-h followed by option-command-m.