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.

(Jim Underwood) #2

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.


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).

(Jim Underwood) #4

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.


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!