Word selection
Posted: Fri Mar 13, 2015 10:21 am
To select a word in a document (i. e. doc, pdf, txt) you can use the combination (ctrl | shift | left arrow). So far, I used the following code, which I compiled to an exe-file and assigned a shortcut to it.
That worked fine with Win XP, however it failed with Win 7. Does anyone know, what happened? Btw, a solution including the Win-Api function keybd_event() doesn't work either.
Code: Select all
XIncludeFile "COMatePLUS.pbi"
oScript.COMateObject
oScript = COMate_CreateObject("WScript.Shell")
command$ = "(^+){LEFT}"
oScript\Invoke("SendKeys('"+command$+"')")
Delay(50)
oScript\Release()