I have some AppleScripts that pull in other AppleScript files as libraries. Is there any way to do something like this with an Execute an AppleScript action? (i.e., “install” the library AppleScript some way that Execute an AppleScript actions can invoke handlers from the library script.)
I think I can deal with one of my specific situations another way, since all the immediate AppleScripts do is pass arguments to one of the library handlers. I can put the handler in a macro and have the immediate macros set KM variables then call the macro with the handler script.
But sometimes library use gets more complicated, so I was wondering whether anyone had any ideas about this. (Not that script libraries are necessarily that common in KM-style scripting.)
And in one of the specific cases that just pass arguments, the library script handlers are larger than I would want to put in an Execute an AppleScript action (35 lines in one case). Moreover, some of libraries have quite a few handlers — I collect them over time in application-specific and general “utility” scripts (for example, “FinderUtil”, “MailUtil”, and a general “Util”). It would be ugly and tedious to break out the handlers I want for specific KM macros, and really difficult to maintain.
Could these be turned into a plugin somehow?