Permalink
Browse files

An initial script to tickle Apple Events from Ruby via ScriptingBridg…

…e. Plus some notes on how to do that.
  • Loading branch information...
1 parent 6260746 commit aa5f490597493527e9ec49e329d48d30bd267cc0 @curtclifton committed May 10, 2012
Showing with 16 additions and 0 deletions.
  1. +10 −0 OFKanban/README.txt
  2. +6 −0 OFKanban/test-scriptingbridge
View
10 OFKanban/README.txt
@@ -0,0 +1,10 @@
+Note that rb-appscript is discontinued and rbosa also hasn't been updated in years (and wouldn't gem-install for me on Lion. Going to try MacRuby and scripting bridge.
+
+http://macruby.com/downloads.html
+
+A useful tutorial: http://arstechnica.com/apple/2011/09/tutorial-os-x-automation-with-macruby-and-the-scripting-bridge/
+
+
+
+
+
View
6 OFKanban/test-scriptingbridge
@@ -0,0 +1,6 @@
+#!/usr/local/bin/macruby
+
+framework "ScriptingBridge"
+
+safari = SBApplication.applicationWithBundleIdentifier("com.apple.Safari")
+safari.windows.each {|window| puts window.currentTab.name}

0 comments on commit aa5f490

Please sign in to comment.