Script: Open Application’s Scripting Dictionary
Today’s script is a bit of a meta-script. It comes in handy if you’re writing scripts of your own, be them traditional AppleScripts or Ruby scripts with rb-appscript.
- Script: Open Application’s Scripting Dictionary
- Application: Any
- Suggested key binding: None
Peek:
processes = Appscript::app("System Events").processes
is_frontmost_condition = Appscript.its.frontmost.eq(true)
frontmost_application = processes[is_frontmost_condition].first
frontmost_application_path = frontmost_application.application_file.get(:result_type => :file_ref).path
system('open', '-a', 'AppleScript Editor', frontmost_application_path)
This script opens the scripting dictionary for the frontmost application in AppleScript Editor.
Installation is a bit different for this one. Because you want it to be available to all applications, you put it right in ~/Library/Scripts, not in a subfolder.
Get the standalone script file, or git pull if you’re keeping a git clone of the scripts.
This post of part of series about the scripts I use with FastScripts.
Got comments? Use reddit and/or poke me on twitter.