I am trying to think of a way that you could make it so if you long press a keyboard shortcut it only does the second half of a macro (or the first half that part doesn’t really matter too much). This way you get two commands out of one based on time held down and you don’t have to mess with the conflict pallet and a second keystroke.
I am trying to make a macro that pastes in a value of " - 01" and then short press it again and it increments to then next number " - 02" etc indefinitely (or at least to 99). Then if you long press the same shortcut it resets back to 01 again and resumes pasting in the next number upon short presses.
It is somehow saying if the key command does not match less then the delay time then start “MyCounter” back at 1.
With “any of the following are true” then with the long press it resets the value (as desired) and under the pause value will increment to the next value number.
If you change the if to “none of the following are true” then it reverses the behavior.
If you change the if to “not all of the following are true” then it always resets the value.
If you change the if to “all of the following are true” then it always counts up and never resets the value.
I’m trying to wrap my head around this but am a bit lost at how it is working though I have been using it a lot!
I can get my head around @JMichaelTX reference post but it doesn’t seem to be as compact as what you have done as far as I can tell.
^ = power operator
\ = I have no idea
D = I don’t know date and current time
? = ternary operator (whatever that means)
$ = Variables or array access (okay new to me, use to that being fixed values in Excel)
I have given it a valent effort to try to make sense of it and you just whipped this out in about 10 minutes or less after my initial post!
that macro is really nice - very nice, thank you.
I really wish there was a way to do that with the
tapped once, twice, three times trigger type.
tapped once = macro A
tapped twice = macro B
tapped three = macro C
As you know, the way it is currently programmed, if you tap the trigger three times it also triggers the twice and once keys - not so useful as I can see (although I’m sure there’s a use) I just think the example I laid out would be SO much more useful.
Just my thought.
@skillet, please use whatever solution works best for you.
But I'm not sure what you mean by my macro "doesn't seem to be as compact as what you [@DanThomas] have done . . . ".
Dan's macro has about 7 Actions, whereas mine has about 8 (not counting Comment Actions). So it would seem to me that they are about the same "compactness". But I am always looking to improve my stuff, so please feel free to make any suggestions to do so.
Keep in mind that my macro is designed as an example for users, so it favors clarity over compactness. After you download it, you can optimize it however you like.
Having said all that, I think all you need to do to use my macro is:
Change the Hot Key to your preference
Change the keys used in the "Check for Long Press of Trigger" Action to match the Hot Key Trigger you use:
Insert the Actions you want for a long keep press, and or normal key press, in the "Process Actions Based on Long Press Option" Action:
You can replace my "Display Text" Actions with your Actions, if you like.
You're right it isn't much longer in the benefit of yours is I could follow it I counted 11 needed actions for yours and 7 for Dan's. 10 if you don't use the last action to clear it out to be safe and then you would need the action to set the variable if you don't have the keys pressed down, so I guess you could remove one or the other leaving you 10 (I didn't count the Display Text action I left in there). Your macro you had to set a variable and then use that variable's result to then choose to do the next actions where Dan's doesn't seem to need an extra variable to then do the variables he has in his macro. Some sort of magic voodoo is being done with ^\d\d?$
Also I noticed that I can keep the modifier held down with Dan's when one is set and release the action key (i.e. Command+F4 I can still hold down command and release F4) and it will then do the short press. I realized that in order to get that same behavior I couldn't just not select any modifiers I actually had to remove the modifier option. Otherwise I have to release the modifier and the action key to get it to work which is not as natural to me. If I take off the option for the modifier then it never does the short press action, a bit confusing but good to know.
LOL LOL, yeah the word thing is funny Dan, - =)
Peter, thank you for your reply and your other replies to my ‘beginner’ posts.
Since ‘coming over’ from quickeys, I really want to tell you that I am SO enjoying being a part of this community AND having such strong, flexible, supported software to work with.
~ Can’t thank you enough or say enough positive things about KM. -