Inspect an application's AppleScript scripting dictionary and decompile a saved compiled script back to readable source

domain: developer.apple.com · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Open the target application's scripting dictionary in Script Editor (File > Open Dictionary) to browse the commands, classes, and properties it defines.
  2. Alternatively extract an app's dictionary definition from the command line with `sdef /Applications/AppName.app`, which prints the underlying XML scripting definition (sdef format).
  3. To read a compiled script (.scpt) or script bundle whose source text isn't visible, run `osadecompile <file>` to print its AppleScript source back to text.
  4. Cross-reference class and command names from the decompiled/dictionary output against the app's own dictionary before writing new automation, since AppleScript terminology differs per app.
  5. Confirm the script wasn't saved as run-only (compiled without embedded source); only scripts that retain their source can be recovered with osadecompile.

Known gotchas

Related routes

Batch-process files in Finder using AppleScript's Finder dictionary or the macOS Shortcuts app, invoked non-interactively from the command line
developer.apple.com · 5 steps · unrated
Automate macOS applications using AppleScript via osascript from the command line or scripts
developer.apple.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans