Identifying a macro's version number?

I want to come up with a method for identifying a macro’s version number. Something that can be accessed either via AppleScript/JXA, or directly from some KM actions.

I’d like to have this available so an installation script of some kind can determine if a an existing macro is older than the version it wants to install.

I suppose the easiest way is through a comment of some kind, but I was wondering if anyone had any other ideas?

Dan, I like your idea, but I think it is a real challenge to achieve on a reliable basis.

Having said that, you may have noticed in my recent attribution comments I have been changing the name of the Comment to this form:

~~~ VER:  n.m    yyyy-mm-dd ~~~

~~~ VER:  1.2    2016-08-14 ~~~

While the name of an Action can obviously be changed, it is not as easily changed as the contents of the Action, and many users probably don't even know how to change the name.

So, here's one idea:

  • Make sure the first Action in a macro is always the attribution Comment
  • Change the name of that Comment to a standard format that we can get a consensus on.

Now, I don't know how, or if, you can get the name of an Action via script, but I suspect that you do.


Yes I had, and I wish I thought of it before I posted this topic. I really like this idea. I hadn't really thought about the fact you changed the comment's name. That works for me, for sure. Yes, someone could still change it, but not unintentionally, which was my concern.

Another great idea! You're on a roll.