Thanks Sing! That's exactly what I was looking for! And you are right, your script already does exactly the same thing, with more options.

But I learned a trick I can use again!
Skuk
quote:
Originally posted by Singularity
Skuk, I just told you how to embed a carriage return using #42 as the ascii code. The usual
for CR is ^M or some use ~, I use ^M in all my macros. You can use * too if you want. Like...
getInput $trigger "Enter trigger string "
getInput $action "Enter command to send "
replaceText $action #42 "^M"
SetTextLineTrigger 1 :bang $trigger
pause
:bang
replaceText $action "^M" #42
send $action
halt
That way you can use ^M as the internal standard. Look at my macro utilities on grimy,
all of this is covered with complete examples, including a script that does exactly
what you're trying to do (why re-invent the wheel?).