I’ve just skimmed this thread, so I might be getting the wrong end of the stick, but is the issue that KM in some circumstances doesn’t appear to execute an ASObjC script properly, or at least not in the same manner as other script runners do ? Is this to do with NSWindow
and NSView
object instances failing to be created in KM ?
This is presumably the same case when running those scripts using osascript
from the command line ?
If it’s useful to know, when I last used KM about two years ago, it relied on osascript
to execute AppleScript files and AppleScripts supplied as text to its Execute An AppleScript action. And osascript
’s environment is only a subset of the AppleScript environment that’s instantiated when running in Script Editor, Script Debugger, and the like.
Similarly, FastScripts used to execute its scripts either using osascript
or something similar, and wasnt able to create NSWindow
graphics contexts. But the engine was overhauled for version 3, and since then, I believe it not only executes every script in its own separate environment, but that environment is now a bonafide AppleScript instance so one would expect it to handle anything Script Debugger can handle.