Hey there. Just trying this software out because Automator has failed me. And running into issues here as well.
Specifically everything seems to work EXCEPT for the "Insert Text" when I use any type of variable. I've tried using %SystemClipboard% ... I've tried taking a variable from the user. I've tried insert by Typing and insert by Pasting. All of them end up causing the same thing. The string that should be expanded, such as %SystemClipboard% or %Variable%code% ... Ends up being typed/pasted as that raw text, and not the value.
What's odd is that I tested these by adding an Alert with these in the text box instead, and there they are being expanded. So why aren't they being expanded in the 'Insert Text' options?
Howdy, welcome to the forum! As you might have already figured out, this is a great community full of people who love to help.
If possible, post the macro itself so we can take a look at it and see what might be going wrong. As one of the moderators likes to say, "If we're not testing we're guessing, and guessing often wastes people's valuable time". If you need help on how to post the macro, just let us know and we can walk you through it.
If you haven’t had the opportunity to read this tutorial, I highly recommend it. It will help you get the most help for your question.
All that being said, typically when you want to insert the actual token/variable etc. using the insert text by pasting/typing action, you need to wrap them in double % symbols. So instead of %SystemClipboard% you would use %%SystemClipboard%%.
Post a sample macro that demonstrates the issue -- instructions for posting here. But do also check the "Insert..." action's Settings (click the cogwheel) and make sure that it isn't set to "Process nothing" and so not evaluating the tokens.
IMO good design -- you've explicitly told the action to not process tokens, so KM shouldn't change things behind your back. You might, for example, want to display a list of variable names and be adding those variables with the "Insert Token" dropdown.
Not on my systems -- all actions default to "Process Text Normally" (you don't get the choice on "Alert" actions). Have you got these actions as "Favourites"? IIRC "Favourites" retain any options you've set, which could explain it.
You often get strange effects when recording actions in the thing that's recording the actions! KM is recording what you've done -- you started recording, you hit ⌘⌃A, you typed "insert" into the search box, and you hit Return, all of which KM has faithfully added, then you stopped recording. And then the result of those actions, the "Insert Text by Pasting", is added because that's what you've just told KM to do.
The default for actions is almost universally Process Tokens.
When you record typed text, the text is recorded and played back. In that case, the Process Tokens is turned off explicitly. I can't imagine anyone would record typing "%LongDate%" and expect it to play back as a date.
The first three actions are entered as part of the recording. Hence, the Insert Text action has captured your typed text of “insert” and is configured to not process tokens.
The last action is the result of your adding the action. It is not recorded. Recording does not stop the things you are doing form happening. Recording while in the editor and changing your actions is going to produce interesting results.
The expectation of playing back a recording is that it plays back what you did, more or less, but as accurately as reasonably possible. That said, recordings typically need some level of cleanup unless they are straight typing. Recording also tries to capture the highest level intent (such as moving windows or selecting menus rather than just mouse clicks).