Version 0.3.0 of Scriptview, my cross-platform GO tool to view the source code o...
Quin @TheQuinbox@dragonscave.space
Version 0.3.0 of Scriptview, my cross-platform GO tool to view the source code of compiled AppleScripts, has been released. Changelog:
- Old Japanese scripts decode as Shift JIS instead of printing garbled text.
- Scripts from classic Mac OS get the terms of about 80 classic scripting additions and apps, such as the Finder, HyperCard, and the Scriptable Text Editor, which cuts their raw codes from 257 to 23.
- AppleScript 1.0 scripts use Apple's own symbol table, read from the AppleScript 1.0 extension, which fixes 5 symbols that were guessed wrong, including
trueandfalse. - Added scripts from the AppleScript 1.0 beta (
FasdUAS 0.95), which use other node letters, layouts, and symbols. The 16 beta scripts that came with plain-text copies decompile to the same code, apart from wording such asactorforscript. - Run-only AppleScript 1.0 scripts decompile, including handler parameters, list literals, and script objects.
- Run-only output compiles back to the same bytecode for 11,632 of 12,150 scripts from GitHub. Fixed
getonrepeat withloops, handler arguments, andwhosecontainers,copy, properties in their original order, labeled handler parameters, nested destructuring such asset {{a, b}, c} to x,its «class x»,«property x» of application "A",idvalues, and the ends of element ranges. - Fixed
-- copy (incomplete)lines in run-only scripts from early compilers, which keep acopystatement's value as the script's result. - Output matches
osadecompileon 12,105 of 12,143 scripts from GitHub and on all 163 scripts that ship with macOS 26. - Fixed parentheses around
not (exists …),a reference to (… whose …), comparisons inside comparisons,my xin arithmetic, a minus sign before a reference or a call, and a reference afterid. - Fixed escaping inside
|pipes|, andappused as a name. frontandbackprint as written instead of asbeginningandend.- Reals print with at most 12 decimal places, like Script Editor. Run-only output keeps every digit.
- Long text stored in one block decodes correctly.
AppleScript Editorgets Script Editor's terms.- Classic scripts print
windowandapplication, notWindowandApplication, which one old scripting addition used. - Terms that only old Mac OS versions define, in the QuickDraw, table, and accessory suites, no longer replace newer names.
- The docs are now a reference for the format: every record, typed vector kind, syntax tree node, and opcode, with how often each occurs in real scripts.
Note: this was heavily vibe coded. This is a project I've wanted to do for the past 5 years, and I did give claude a lot of info I had already learned from looking at compiled scripts, but if AI-generated code is a no for you, keep on scrolling.
You can grab it from the GitHub release at https://github.com/trypsynth/scriptview/releases/latest or install it with Go 1.26 or later using go install github.com/trypsynth/scriptview/cmd/scriptview@latest.