AppleScript-IDEA
AppleScript-IDEA copied to clipboard
messy code?

WebStorm v2021.2.3
Since no one has responded in months I'm gonna drop some info that might help people reaching this issue from Google in the future. This is a common issue with AppleScript when you have the file open more than once at the same time (including the osascript command line utility). From what I've gathered the cause seems to be that if anything recompiles the script while it's being held open by another file handle, the OSA compiler somehow writes the resulting bytecode out of bounds. The system's Script Editor should be able to open the file but you will notice all symbols are replaced by the internal references in the shape of ≪≪event RefCode≫≫, similar to when when you're missing the dictionary of a Cocoa scriptable app.