This program I stole straight out of the docs:
InputBox, UserInput, Phone Number, Please enter a phone number., , 640, 480
if ErrorLevel
MsgBox, CANCEL was pressed.
else
MsgBox, You entered "%UserInput%"
This works fine and the variable containing the user's input does half of what I want. Instead of the 2nd Msg Box, I want to send a sentence like Your phone number is %UserInput% to Word or Notepad or some other app. I've tried replacing the 2nd MsgBox line with a Send command. That didn't work. I tried assigning a hotkey to the script, so I could actually be sitting in my target app when I called the script up. That didn't work. I've been looking at WinActivate, but I'm not sure how to use that. Mainly, I'm not sure if the problem is in the script (syntax) or that I'm lacking a command.-ralphkru
here's a super simple example using 2 hotkeys (one for input, and one for output) -
#persistent
#singleinstance, ignore
#I::InputBox, UserInput, Enter a phone number,,, 150, 90
#O::sendinput, Your input value was '%userinput%'
WIN+I invokes the input box and populates the var UserInput with a value (or not, if you cancel the dialog)
WIN+O sends the output to wherever the cursor is (so some care may need to be taken)
Of course you can make this a lot more sophisticated depending on your requirements, but this covers the basics of what you're trying to do