How to convert user input by pressing: 1,2 or 3 to "Actions" allocated to pressing 1,2 or 3?

In KM I would like a program to wait for the user to input either 1,2 or 3 (in a multiple choice window) and then KM to output the result via the paste command (the clipboard, being affected by the users input):
If = 1 Then Paste the Icon of Chrome
If = 2 Then Paste the Icon of Firefox
If = 3 Then Paste the Icon of Safari

I do not have much experience with variables in KM, but so far I have tried, but was unable.

I guess it is pretty simple when you know how to do it?

UPDATED: 2019-03-23 22:55 GMT-5
I have replaced my entire post.
My previous answer using a typed string was not responsive to your question.

Perhaps this macro can get you started.
I have set the Chrome Icon path from the icon inside of the Chrome app. You will need to do the same for FireFox and Safari.

This is just an example. You will need to revise and test to meet your needs.

How To Use

  1. Please text cursor at the point in a rich text document/field where you want the icon to be pasted.
  2. Trigger this macro.

MACRO:   Paste App Icon [Example]

~~~ VER: 1.0    2019-03-23 ~~~


Paste App Icon [Example].kmmacros (19 KB)
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.



Hey Saimen,

It looks to me like you want Prompt for User Input action.

You could use a text field or have checkboxes.


1 Like

@KM_Fan_1968, Chris, is right. I overlooked your statement:

So, use whatever trigger you want and then use the Switch case Action:


1 Like

Just updated my above post.

1 Like

Thank you Indiana Jones Michael! :slight_smile: solved it greatly!