Request for Feedback: Use of AppleScript Script Library in KM Macros

###Request for Feedback: Use of AppleScript Script Library in KM Macros

Hey guys,

As you know I use a lot of AppleScript and JavaScript for Automation (JXA) scripts in my KM Macros. As a result I have a number of script functions (called “handlers” in AppleScript) that I have developed and reuse many times. This is the well-established standard in the software industry.

I’d like to use the standard AppleScript Script Library system in the scripts I use in many KM Macros. But before I do so, I’d like to have your feedback on this change.

###What It Means to You

  • One time, you will need to download and install my KM Script Lib (very easy to do)
  • After that, you would not need to take any actions unless I publish an update to my KM Script LIb

###Benefits

  • Keeps the scripts used in KM Macros simple
  • Ensures that I can use well-tested script functions
  • Any bugs/enhancements that are found can be make in one place, and then all macros/scripts automatically use them.
  • Easier to update than replacing a macro
  • Higher reliability, fewer bugs
  • You can use these functions in my Script Lib for any other scripts that you write/use.

###Cons

  • Not many, no really big ones
  • Main issue is clear communications of how things work
  • But it does create a dependency on the script functions in the KM Script LIb for the Macros that use them.
    • Of course, at any time, you could copy the functions from the Script Lib and paste them into the script in the Macro, and make one small change to the main script.

So, please give me your feedback:

  • Reply to this post with any comments you have
  • Vote in the poll in the next post.

I welcome all of your honest, candid, constructive feedback. I want to use the Script Lib, but it must be an approach that you guys are comfortable with.

Thanks.

2 Likes

Here's the poll.
###Please Make Your Choice:

  • I'm OK with using JMichaelTX's Script Lib.
  • I would prefer to keep things the way they are -- embed the functions in the Macro script.
  • I need more information before I can decide. (please post your questions below).
0 voters

Hey JM,

You can stage your library from GitHub like Mark Alldritt.

curl https://raw.githubusercontent.com/alldritt/AppleScriptLibraries/master/MarksLib.applescript | osacompile -o ~/Library/Script\ Libraries/MarksLib.scpt

MarksLib on GitHub

You could even have a macro that periodically checked for updates.

-Chris