Page 1 of 1

insert text dynamically

Posted: Mar 24th, ’15, 08:47
by awayand
Is there a way to use fastkeys to have dynamic text for text snippets?
For example, the text snippet would say:

---
Dear Mr. XXX,
thank you for contacting me. The price is YYY. Let's meet next ZZZ.
---

So when I activate this snippet, the cursor will type out "Dear Mr.", and let me insert "Joe" manually, then continue expanding "thank you for contacting me. The price is", then letting me enter whatever I want, etc.

Any help greatly appreciated!

Re: insert text dynamically

Posted: Mar 24th, ’15, 09:56
by Marko
yes, this is possible, using a short code. Actually I can think of automating this via dynamic variables in the next version release of FastKeys. Thanks for an idea!

For the time being try this:

Type=Command
Command:

Code: Select all

gui, add, text,, Customer
gui, add, edit, xp+80 yp vCustomer
gui, add, text, xm, Price
gui, add, edit, xp+80 yp vPrice
gui, add, text, xm, Day
gui, add, edit, xp+80 yp vDay
gui, add, button, xm w75 h23 default, OK
gui, show
return

ButtonOK:
gui, submit
gui, destroy
Send, Dear Mr. %Customer%,`n`nthank you for contacting me. The price is %Price%. Let's meet next %Day%.
return
What do you think? Please let me know if you need more information.

Re: insert text dynamically

Posted: Mar 24th, ’15, 10:10
by awayand
that works, thanks a lot!

Re: insert text dynamically

Posted: Mar 24th, ’15, 11:31
by Marko
Command slightly updated.