Something Simple: insert current date

I use Pages & in the past used and liked QuicKeys and liked it quite a bit [because you could drop down the Menu and trigger an action within an application] and have used TypeitforMe and Text Extender. I bought KM with the hope that I could replace and replicate what I used with those apps = I am not intending to be a coder or expert, just making life easier. But I’m having trouble with something simple: being able to insert the current date. In other apps I am able to use a keystroke and the current date will inert in format desired [full month date, year] - so tried it in KM = when I use my keystroke it comes out = %ICUDate%MMM d, yyyy% - it doesn’t insert the Date but it inserts that token.

I know this works:

%ICUDateTime%MMM dd, yyyy%

I have various macros that insert versions of this, based on different situations. Here's one:

This macro uses a "typed string" trigger, which means when I type LU in upper case, it causes the "LU" to be deleted with backspaces and then the text with the date and time are pasted in.

Note the "match after a word break" setting. This means that when I type "LU", it must be the start of a word (like after a space, or at the start of a line, etc). So if I type "PLU", this will not trigger the macro, because the "LU" portion is in the middle of a word.

This particular macro is in a group that is only active when Keyboard Maestro is running. I use it to update the date/time in "Comment" actions I use for some of my macros.

Hope that helps!

2 Likes

I’ll give that a try - I can keep KM running but am usually trying to use my keystroke to insert current Date in Pages Document - Thanks for the help

Well then, try this. It's just a suggestion, but this is what I'd do:

  1. Make a new Group called "Pages".

  2. Set the group so it is available when Pages is running, like this:

  1. Put the macro in this group.

That's all you need to do. Then you don't need to leave the KM Editor open.

Welcome to Keyboard Maestro! Feel free to ask questions, search around, whatever. "Stupid Questions" welcome. :slight_smile:

1 Like

Thanks much = Once I get the hang of KM I’ll perhaps figure out the simplest things to do = like the Pages group = makes sense == I do need to KISS ! I’ll see which works best for me and appreciate your answer and patience.

Awesome.

Yes, the learning curve can be steep. KISS is a really good idea, and I agree with it, especially when starting to learn KM.

Of course, nothing ventured, nothing gained… :wink:

If it turns out this answered your question, can you mark my post as the answer? That’s so the topic will appear with a checkmark in the list of forum topics. Thanks!

Well I DiD as you suggestED [for some reason the small 'D' is not now working except by autocorrect apparently] & I copied your scheme & it put in the actual token string & not the current Date

Drat!

I think you may need to use %ICUDateTime%… not just %ICUDate%…
even though you aren’t going to use any of the time elements
If you click on the Insert Token dropdown and then the date tokens, you’ll see that they all begin with %ICUDateTime%

Thank you = I on’t want time in there - I’ll try that an see if it at least converts to something then I suppose I have to figure out how to delete the time = but I’ll give that a try = but I Do not want Day or Time = only current Date = it was lots easier in QuickKeys an maybe even in TextExpanr

I testeD it in Pages == came in as
12 08, 2016

not sure why yet = will check the token page

Token Page an Wiki helpeD = i was short two Ms

December 08, 2016 – https://wiki.keyboardmaestro.com/Dates_and_Times

I assume that if I want to be able to use the current Date in other apps that I just aDD either a new group for each or better yet do a Macro that applies to all the listed or checked off apps and then create the rest of it?

1 Like

Glad you got it sorted. The date/time and formatting is so easy to get wrong…

Yes, if you want the same thing in multiple apps, then you could create a group that is active for those apps. For “typed text” triggers, this is probably easiest.

I discovered another way if I do want the KM Palette showing [which isn't so bad] which is to put it in a global macro group and put it as a palette click

Do you want it in a palette? Or are you under the impression that you have to put it in a palette?

The reason I ask is that the subject of Groups and Palettes is confusing, even for people who have used KM for a while, so I wanted to make sure.

Let me know either way. :slight_smile:

Well the Palette does allow me to have the Today’s Date appear no matter where I am
December 8, 2016

Ha! it works = so I don’t need to restrict it to Pages and don’t need to memorize another keystroke and it’s small enough not to mean much ==

on the other hand it’d be nice to understand Groups etc = What I have done is create a group under my own name with my favorite ones = i.e. my email addresses [all 3] and other basic things == I can then find them but they seem to be working no matter where I am = what I need to do now is create what I had in TextExp - addresses, closing sigs etc = I assume I can do that in KM, just need to know how [I’ll check the wiki and peoples macro contributions]

victoria

Right, sounds good.

OK, so with Groups you can:

  • Organize your macros (duh).
  • Groups can be Activated/Deactivated, based on things like which application(s) are running, which windows are active, etc.
  • Groups can also be used for Palettes, in all sorts of ways.

So, decide how to organize and name your palettes based on the above. But the truth is, you’ll probably change your mind a few times before you get what you want. At least, I did (and still do, sometimes!).