Prompt for notes on changes when saving

I’d like a setting to be prompted when saving to add notes about the changes I made, which would be saved as a change log noting the build number and my notes about what changed. So basically when I hit command-s a dialog pops up with a text field for me to type some notes and press enter to save it to the change log.

I don’t know if this will meet your needs or wants, but I do something similar using internal AppleScript properties, and Keyboard Maestro to update the script version and a simple comment for the reason of the update:

property ptyScriptName : "Set KM Variables to Outlook Msg Header"
property ptyScriptVer : "2.1" --  ADD Set KM OLBody
property ptyScriptDate : "2018-08-31"
property ptyScriptAuthor : "JMichaelTX"

So my KM Macro

  1. finds these property lines in the script
  2. parses the text with RegEx to get the Version Number
  3. increment the version number
  4. sets the date to today’s date in ISO format
  5. presents me with dialog to confirm or edit
  6. then updates the lines back in the script


The main difference with your request is that there is no log, only the last update, and the update comments if very brief. But it has the advantage of always being part of the script file.

If this is of interest to anyone, please let me know and I’ll clean-up and post my KM macro.

BTW, the reason I use AppleScript Properties for this data, rather than just text in a comment block, is that I can then use/output the data in any error reports or return blocks.

1 Like

Awesome, thank you! I’ll need some time (which I don’t have right this second) to play with and think about this but looks promising. I was already starting to head down this path so as to be able to include useful information in error messages/reports as you say.

The only other factor was trying to force myself to do it reliably. I did have a buildNo property which I updated manually and kept a log in a comment block, but the problem is that I’m sometimes slack – I think something is just going to be a small change with few consequences and things get out of date or I forget to update the build number or something. Using KM is a good idea.

I’m now using SD to automatically increment the build number when saving but haven’t yet figured out how to include that in the email reports which are sent when an unexpected error occurs (without using ASOC).

If you use KM, you could use CMD-S as the trigger for this property update, and then the Macro would do a SD File > Save. You could also setup the KM Macro that would allow you to cancel the properly update, but continue with the save.

1 Like

You’re reading my mind! I was wondering whether I could use cmd-s but thought that SD would win the conflict. :blush: That’s perfect if cmd-s would work. Can’t wait to give it a go. :blush: Thanks again!

Hello @AppleScripter ,

I am a user of Keyboard Maestro, too - and yes it will work but not if you have only KM running.

there is a tool out there called Spark - and it is free. with its background Application Spark Daemon running you can override every Default Shortcut which is provided by the Applications Developer or even the custom ones you have mapped.

Note : It will only work for Apps like KM or Safari or SD - that means - Apps whose are in Use of the Left Side of the Macs MenuBar.

In @JMichaelTX 's case with a Macro - you have to add an AppleScript Action to SD in Spark with the command cmd-s and provide it with the Script of the Macro which is created for you when you create a new Macro in KM.

Here is the Link to Spark

greetings from Germany


If you have further Questions I will try my very best to give you an answer.