I wanted to be able to auto-select the last pasted text in ms word. I found this script which works, but somehow it causes fastkeys to crash. Fastkeys is not able to reload after I use this shortcut, it shows "cannot close previous instance of this script" error.
Is there something wrong in following script.. Thanks in advance..
shortcut -
^v with hook option.
Type command -
sleep, 100
oWord := ComObjActive("Word.Application")
sleep, 100
Range := oWord.selection.range
sleep, 100
Range.paste
sleep, 100
Range.select
return
Autoselect last pasted text in Ms word - causing fastkeys to crash
What if you add this at the end of the script?
Code: Select all
oWord:=""
Range:=""