Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

added Open Application's Scripting Dictionary

  • Loading branch information...
commit ef50b352f750fc73d22d1c9547dda32ee70c50c0 1 parent b901469
Caio Chassot authored September 25, 2010
14  Open Application's Scripting Dictionary.rb
... ...
@@ -0,0 +1,14 @@
  1
+#!/usr/bin/env ruby
  2
+# encoding: UTF-8
  3
+require 'appscript'
  4
+
  5
+#############################################################################
  6
+# Open the frontmost application's Scripting Dictionary on AppleScript Editor
  7
+#############################################################################
  8
+
  9
+processes                  = Appscript::app("System Events").processes
  10
+is_frontmost_condition     = Appscript.its.frontmost.eq(true)
  11
+frontmost_application      = processes[is_frontmost_condition].first
  12
+frontmost_application_path = frontmost_application.application_file.get(:result_type => :file_ref).path
  13
+
  14
+system('open', '-a', 'AppleScript Editor', frontmost_application_path)

0 notes on commit ef50b35

Please sign in to comment.
Something went wrong with that request. Please try again.