I am reworking a FileMaker database that uses AppleScript. Most of the “heavy lifting” occurs in the database (and the database forms the user interface). But I need to do some things (like parse and make previews of image files) using AppleScript.
In my current version, I just cut and paste text into “Do AppleScript” steps. When I have a bug, I copy the text, paste it into Script Debugger, debug, and then paste back. It is a PITA, but it does work.
What I would like to do is create a library, and then load it and call entry points in FileMaker, so I can see all my AppleScript code at the same time and share common functionality. There are some descriptions of this in “AppleScript: A comprehensive guide…” by Rosenthal, but I haven’t fully groked them.
My first step to do this was to try to figure out how to create a library in the “AppleScript Debugger” language, but even using Script Debugger, I can’t seem to do it. (I create a script in File #1, save it as a script, then create a script in File #2, “load script” from File #1 and try to call an entry point–this works if both are compiled as AppleScript, but not when the loaded script is compiled as AppleScript Debugger). FWIW, the discussion in the Script Debugger Manual (p. 3-44) of how to compile an AppleScript Debugger script in Script Editor does not seem to work either.
So my questions are:
- How do people debug AppleScript/AppleScript Debugger libraries in Mac OS 10.4?
- If you can compile a library in AppleScript Debugger language, how would you call it from AppleScript?
(Apologies if these questions have been raised before–I searched a little and couldn’t find them)