I'm a writer, and I would like a script that would select the last word, or the last two words, up to the last five words, and copy them to the FastKeys clipboard. These would be words or phrases that I'd use a few times in one document and then never need again, so putting them into a phrase file would take a lot of time.
Ideally, I could run a hotkey that would ask me for a number between 1 and 5, and then select that number of words. If five separate scripts (with five different hotkeys) would work better, that's OK, too.
Is what I'm asking for possible? Can anybody here supply this kind of script? I'm not great at computer languages; I tried to learn the difference between a function and an object once, and my head hurt for about three years.
Thanks!
Script to select X number of previous words
-
- Posts: 5
- Joined: Oct 20th, ’15, 04:56
easy... make a shortcut, Type: Command.
Although it's probably faster just to Crtl+Shift+Left couple of times...
Code: Select all
InputBox, no,, Number of words:,,200,130
Send ^+{Left %no%}
Send ^c
-
- Posts: 5
- Joined: Oct 20th, ’15, 04:56
Thanks - it works great!
You're right, in many cases just Ctrl-Shift-Left is faster, especially for 1 or 2 words. But I got used to working this way in WordPerfect (it is very easy to record macros in WordPerfect without much programming), and I've been wanting to have it available more globally.
FastKeys is probably the smartest $10 I ever spent. Again, thanks!
You're right, in many cases just Ctrl-Shift-Left is faster, especially for 1 or 2 words. But I got used to working this way in WordPerfect (it is very easy to record macros in WordPerfect without much programming), and I've been wanting to have it available more globally.
FastKeys is probably the smartest $10 I ever spent. Again, thanks!