How to combine a Script WITH RichText

Discussion, questions and support.
Post Reply
Chuck
Posts: 3
Joined: Jul 30th, ’18, 22:36

Post by Chuck » Jul 30th, ’18, 23:16

Hello!
Some time ago, I added to the FastKeys "Text Expander" Module a RichText Template which I use very frequently.
It works Great because it includes formatting like my preferred Linespacing, Paragraph-spacing, Font, ETC. (which would be a real hassle to do manually).

This Template also REQUIRED some scripting, INCLUDING {These 4 Items Are NOT Yet in FastKeys}::
1. Open the Program in which I do my writing & confirm that it is the Active Program;
2. Type the String that Triggers the Text Expansion;
3. Move the Cursor to the point in the Template at which I begin typing;
4. {And a couple other small edits }.

SINCE I AM NOT YET ADEPT at using FastKeys, the above 4 Script Items are done by another macroing program I use that works just fine with FastKeys —Even Though I would GREATLY PREFER that the Template-&-Scripting Are Combined within Fastkeys!!

Could you please tell me the best way to COMBINE INTO FASTKEYS These Two Items::
My FastKeys-RichText-Template _WITH_ The Modest Scripting listed Above – –
SO THAT I can Press _JUST ONE Hotkey_ & Fast Keys WILL:: •Open the Writing Program; •Send the RichText Template; & •Position the Cursor.

Thank You, Chuck
User avatar
Marko
Posts: 1726
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Aug 1st, ’18, 12:19

Hi Chuck,
there are two ways. Both examples below would
- run Word,
- wait for 2 seconds,
- write some text (Dear...),
- run rich text example (rte from Text Expander)
- move cursor 18 words back (Ctrl-Left 18 times)

1. By using "Insert other item macro". Type: Send

Code: Select all

%INSERT_M_Word%{2000}Dear ,

%INSERT_rte%^{Left 18}
2. By using "gosub" command (undocumented, may not work for all items). Type: Command

Code: Select all

run, winword
sleep 2000
send, Dear ,`n`n
gosub rte
send, ^{Left 18}
I hope you get the idea... :D
Chuck
Posts: 3
Joined: Jul 30th, ’18, 22:36

Post by Chuck » Aug 1st, ’18, 19:37

Hi Marko!

THANK YOU VERY MUCH FOR YOUR REPLY !!

I have another quick question, please --

In my copy of FastKeys, I do not have the Text-Expander Item that was in your example:: "M_Word" !

Is there a way I can recover that item? ?

OTOH, the writing program that I use with this macro, does have its own Launch Hotkey--which Hotkey I adapted your example to Send, and it launches the program & SENDS the RichText Template JUST FINE !!

Additionally, for some reason I never saw the Help Item for:: %INSERT_X% (where X = the Hotstring) !! Which leads me to my 2nd question::

If the item to be SENT is a FastKeys "Shortcut" ("!+z"), does that Also work with the INSERT Variable – Using the Type: Send?
_OR_ is there a better way to Include a Hotkey "Shortcut" within a Type: Send Script?


Thank You Again, Marko !!

Chuck
User avatar
Marko
Posts: 1726
Joined: Mar 2nd, ’13, 21:02

Post by Marko » Aug 1st, ’18, 20:03

For M_Word example, select "Insert another item" macro, select Start Menu on a dropdown selection on the top and select Microsoft Office/Word.

You can insert shortcuts the same way - "Insert another item" macro, select Shortcuts and select one of them.
Chuck
Posts: 3
Joined: Jul 30th, ’18, 22:36

Post by Chuck » Aug 2nd, ’18, 00:21

GREAT!

I VERY MUCH APPRECIATE YOUR HELP, MARKO!

The "Combined" Macro works Perfectly . . .

PLUS, I now know how to combine FastKeys Macros — Even the ones that include RichText! {Which is Amazing!}

Chuck
Post Reply