And just to let you know I at least tried something - - on the KM editor in the actions section in the search box, I typed the word "date" but it returned no results, regardless of which category I have highlighted. And the KM wiki gets into a complicated discussion of "tokens" but doesn't seem to go straight to the simplest answer.
Hi Chris, thank you so much for your detailed reply. This worked the way you told me it would, very nice.
Now just one note about the above, as I use the macros that print today's date in various formats, it looks to me like something about the process makes use of the computer's regular clipboard (copy/paste) register. For example, if I have a block of text from another app, and I went to copy it and then place it in a database, including starting with today's date, using the macro here and then hitting "command-V" for paste, prints only the date, again, rather than the text I had waiting. Then I have to go back to the prior document and select and copy the text again, and then go paste it in.
Is there any way to make this work differently, so that it won't take that memory register space? Or should I just get accustomed to a slightly different workflow, go paste the date and then go back and get the text?
But, in doing so, will it wipe and replace whatever might be in the clipboard already?
My old workflow, with QuicKeys, was 1. highlight/copy text (in Mail or whatever); 2. change to database app (or TextEdit etc.) and enter date received, using macro; 3. paste the relevant text which was waiting in the memory register.
I never found any apps that that didn’t work in, up through Mac OS 10.11, after which QuicKeys no longer worked. Which is why I’ve gone to KM.
The contents of the clipboard is already saved to that history.
The macro uses the clipboard, because that's the only available gateway for pasting text anywhere on macOS – and then it deletes the NEW clipboard entry and leaves the original clipboard item right where it was in the first place.
So try out the macro and see if it works the way you want it to.
Okay, sorry to be a newbie, and thanks for your patient answers.
So a “clipboard history” can be considered to be multiple macOS clipboards? Or some other register of clipboards that KM has as part of its app programming-? The primary clipboard register can keep the data that I have entered, and a date string creation can use a different register? Cool.
Okay I shall try it.
Yes I have imported it and tried it. Seems to work. Trying to understand why, but maybe it’s good enough to just have it there. Thanks for taking the time.
Can I duplicate it and change how it formats the printed date? I like to have the following, for different usages - -
Saturday, February 23, 2019
BTW this is really helping me to move forward in my understanding of KM.
Just splashing in to say: implementing a clipboard history manager is one of the most useful things you can do on a computer.
Data always is a string of digits.
We move data all the time. We call this "copy" and "paste".
Every time we "copy" (or "cut" — which is two operations: copy and delete) the string is saved in the system clipboard.
Every time we "copy" the system clipboard is over-written.
Like many things related to computers, it's dead simple. The system clipboard is a location that holds one string of data. The string can be very very very long — say, a video — and it can be internally complex — say, a database — or as short or shorter than a single character. The system clipboard holds one string. When you replace the content, the new string is remembered, and the old string is removed. Once removed, neither the system clipboard nor the system have any access to the old string (though the original may still be accessed by the user).
A clipboard history manager remembers and tracks each entry, allowing you to access strings copied to the system clipboard prior to the current string in the system clipboard. The system keeps one and only one string in the clipboard. The clipboard history manager keeps a stack of strings. (The stack might be limited by duration (e.g.: a week), number (e.g.: a hundred strings), or something else.)
The clipboard history manager's stack is almost always FIFO — First In, First Out. It functions as a Pez dispenser that you manually load with one candy at a time: the last candy (string) you put in is the first one that comes out.
Keyboard Maestro's clipboard history manager is excellent. Within Keyboard Maestro the stacked strings are ordinated (that is, numbered). Typical for computer ordination, the current entry is number 0, followed by 1, 2, 3, etc. That's why in one of the macros supplied above, the Keyboard Maestro Action "Delete Past Clipboard" specifies "0". "Past clipboard 0" is the string currently in the system clipboard. Once the string in position 0 is deleted, every string in the stack moves up one position, so the string that had been at position 1 is moved to position 0, which is the top of the stack (the next Pez candy to be dispensed).
Because I use LaunchBar all-day every day, I use LaunchBar's clipboard history manager. I recommend it/them.
On to your task at hand .
I insert dates all the time. I use seven or eight different formats all the time. My need is best served by having independent macros for inserting the date/time, each assigned to a relatively easy-to-remember typed-string trigger. (All my typed-string triggers start with a period (dot) character. This has served me well since there are very few instances when I type a period followed by a non-space character.) Most of these use the Action "Insert Text by Typing". Some examples below. (I have scores of similar ones, including one for each program I write about — e.g.: ".km" ➞ "Keyboard Maestro ".)
I recommend that you set these up, customized to your needs. If you use the Action "Insert Text by Typing" you won't have any turbulence in your current workflow. (Nevertheless, I can't recommend a clipboard history manager strongly enough.)
All this touches on and begins to highlight the brilliance of Keyboard Maestro. It is exceptionally well-conceived and executed.
Final disclaimer: I am just a computer user. I've never been in a computer class. I've never written a line of code (I copy and paste). What I've presented above is information that, imho, promotes a useful understanding of computers. I know the representation is not completely accurate (improvements are welcome).
I have a much similar setup. In my case all of my typed string text expansions are in Typinator, which I use in addition to KM because I have nearly a thousand text expansions and it offers some features not in KM. Having said that, if I did not have Typinator, I could easily create these in KM.
My naming convention for triggering text expansions is:
Start the typed string abbreviation with a semicolon
Followed by a 2-3 character string (which is never a space) to denote the app or use case
(I use "'km." for my triggers for text that I use in the Keyboard Maestro app)
Followed by a period
Followed by a short string mnemonic which is very easy for me to remember
Terminated by a space
(I don't use any spaces in the trigger. All "words" are separated by a period.)
Example: ISO Date string for use in KM Actions:
(without the quote marks)
As @Kirby_Krieger mentioned, I find using a prefix of semicolon with a suffix of space ensures I never accidently trigger the expansion, while making it very easy to type.
The key is to work out a system for yourself that is very easy for you to remember and execute.