insert text dynamically

Discussion, questions and support.
Post Reply
awayand
Posts: 2
Joined: Mar 24th, ’15, 08:44

Post by awayand » Mar 24th, ’15, 08:47

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!
User avatar
Marko
Posts: 1726
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Mar 24th, ’15, 09:56

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.
awayand
Posts: 2
Joined: Mar 24th, ’15, 08:44

Post by awayand » Mar 24th, ’15, 10:10

that works, thanks a lot!
User avatar
Marko
Posts: 1726
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Mar 24th, ’15, 11:31

Command slightly updated.
Post Reply