Simple App - Title and Time Logger (v1.0)

Simple App - Title and Time Logger (v1.0)

Hi all,

This is my first posted macro on this forum. I hope you like it.

While busy working at your various computer projects, did you ever ask yourself, "what was I doing a few hours ago?" If so, then this simple keyboard maestro macro could be of help.

This macro will capture the currently active App, Title and Time Stamp, and save it to a text log file at chosen time intervals. This can be helpful when you need to recall what your were working on previously.

This simple log file can be helpful by itself, or the user might consider importing this into a bigger database system if needed. It can work well for a "roll your own" time tracker.

Simple App - Title and Time Logger
v 1.0
By: dealtek
Created 06-18-2021
Updated: 07-28-2021 7-50-23 AM

It can save in 2 ways: clip 1 is set to log data as JSON and clip 2 is set to simple data separated by a PIPE character.

Currently set to: %Variable%clip1%
You can change this by altering this to %Variable%clip2%

MY_FILE_PATH : Set this to the full path of the text file like: /Users/YOURUSERNAME/Desktop/log.txt

Thanks
Dave

Simple App - Title and Time Logger (v1.0).kmmacros (5.6 KB)

JSON VERSION

{"date":"06/18/21 12-01-00 PM", "App": "Safari", "Title": "https://www.apple.com/imac-24/”},
{"date":"06/18/21 12-02-00 PM", "App": "Firefox", "Title": "https://www.macrumors.com/roundup/”},
{"date":"06/18/21 12-03-00 PM", "App": "TextEdit", "Title": "Client Letter.txt”},
{"date":"06/18/21 12-14-00 PM", "App": "System Preferences", "Title": "Accessibility”},
{"date":"06/18/21 12-15-00 PM", "App": "Code", "Title": "index.js — node”},

etc.

Notice each json object is followed by a comma - that way you could easily manually wrap many of these the brackets and end up with a large json array like,

[
{"date":"06/18/21 12-01-00 PM", "App": "Safari", "Title": "https://www.apple.com/imac-24/”},
{"date":"06/18/21 12-02-00 PM", "App": "Firefox", "Title": "https://www.macrumors.com/roundup/”}
]
{"date":"%ICUDateTime%MM/dd/yy h-mm-ss a%", "App": "%Application%1%", "Title": "%FrontWindowName%”},

OR TEXT VERSION...

separated by the pipe character..

06/18/21 12-01-00 PM|Safari|https://www.apple.com/imac-24/
06/18/21 12-02-00 PM|TextEdit|Client Letter.txt
%ICUDateTime%MM/dd/yy h-mm-ss a%|%Application%1%|%FrontWindowName%

etc..

1 Like