nikivi
February 4, 2018, 8:10pm
1
How can I do this?
I can't really find anything on how I can make this. In my case I want a simple macro that if I have not called the macro before, it would do this:
But if it was called earlier, it would instead do this:
So I can effectively call the macro twice if I want to do the second part with the Insert text by pasting
.
Can I do this?
gglick
February 5, 2018, 5:03am
2
Hey @nikivi ,
I don't know if this is the best way to go about this, but here's one that works (change BBEdit to iTerm first, obviously):
edit: karabiner.kmmacros (5.9 KB)
1 Like
This is a relatively simple way to determine how long since the macro is last executed - just track it in a variable.
Note that the variable needs to have a valid value for the condition to make sense, so you might like to include a test for “The variable 'Last Runt Time' is/is not empty” to handle the case if the variable is missing or deleted. In any event, it will sort itself out after running it once.
4 Likes
nikivi
February 6, 2018, 3:30am
4
Thank you. This works really well.
I just logged in to suggest using a variable. But when Peter himself guides you, what more can you add?
Cheers,
Gary
1 Like
Believe me, people often come up with better solutions than me!