AppleScript-IDEA icon indicating copy to clipboard operation
AppleScript-IDEA copied to clipboard

messy code?

Open alanhe421 opened this issue 3 years ago • 1 comments

image

WebStorm v2021.2.3

alanhe421 avatar Nov 27 '21 02:11 alanhe421

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.

bilenkonito avatar Feb 27 '22 12:02 bilenkonito