Skip to content

Instantly share code, notes, and snippets.

@pdxmph
Created November 6, 2011 06:42
Show Gist options
  • Save pdxmph/1342557 to your computer and use it in GitHub Desktop.
Save pdxmph/1342557 to your computer and use it in GitHub Desktop.
Get current Firefox URL with rb-appscript
require "rubygems"
require "appscript"
include Appscript
firefox = app("Firefox")
events = app("System Events")
firefox.activate
events.keystroke("l", :using => [:command_down])
events.keystroke("c", :using => [:command_down])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment