How to use Inputed variable from Prompt user later in macro

Hey everyone,

I’m trying to use the prompt user action to store a variable to use later within my macro.
I’m prompting the user to input 2 numbers, Number_1, and Number_2. I would like to use the inputed information to
type in the Number_1 as a keystroke as well as Number_2 as a keystroke. So If the user enters the number 7, I would like to click on the screen somewhere and have the number entered via keystroke. Is this possible? Thank you extremely much in advance.

Yes, this is definitely possible. What you want to do is create separate variable entry points for each number in the "Prompt for User Input", then use those variables in "Insert Text by Typing" actions:

1 Like

@gglick has shown you how to enter the numbers.
I'd suggest that you first click where you want the numbers entered, and THEN trigger the KM Macro.

Are both numbers to be entered into the same field?
If so, then you just need one Action, with both numbers. How are the numbers to be separated? By return, comma, or other?

Here is one Action with the numbers separated by comma:

I generally use "Insert by Pasting" rather than "by Typing" unless there is a specific reason to do otherwise.
If you want the numbers separated by some other character, just replace the comma with that character:
%Variable%Number_1%,%Variable%Number_2%

If the numbers need to go into adjacent fields, then usually you would use a Type a Keystroke action (KM Wiki) with the TAB character:

Please let us know if you have any further questions.

1 Like

Thank you guys very much! The insert action is what I was looking for! I sincerely appreciate the posts!

1 Like