Skip to content

Instantly share code, notes, and snippets.

@pdxmph
Created November 6, 2011 06:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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