I have a small AHK script now that removes selected text from one input field, replaces it with ___________ and pastes it in a second input field. Here it is...
Code:
F1:: ; Trigger button.
Send ^x
Send ______
Send {Tab}
Send ^v
Send {Enter}
return ; Exits trigger condition actions
As it's written, all text that is cut gets replaced with a single _________ no matter how many words are cut. I'd like to determine how many words are in the text that is cut (by counting spaces with regex I suppose) and insert the same number of blanks.
In other words...
Quote:
The quick brown fox jumped over the lazy dog.
would be...
Quote:
The ________ ________ _________ jumped over the lazy dog.
instead of...
Quote:
The ________ jumped over the lazy dog.
when I cut out...
Quote:
quick brown fox
I don't know how to write regular expressions and don't have time to learn (I'm a medical student who is using AHK along with
Ankito make flashcards for studying during lecture. Adding this feature to my existing script would make things even more efficient.
Thanks in advance,
Ryan