Word selection

Just starting out? Need help? Post your questions and find answers here.
Angelo
User
User
Posts: 10
Joined: Tue Jul 09, 2013 10:23 am
Location: Berlin

Word selection

Post by Angelo »

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.

Code: Select all

XIncludeFile "COMatePLUS.pbi"
oScript.COMateObject 
oScript = COMate_CreateObject("WScript.Shell")

command$ = "(^+){LEFT}"
oScript\Invoke("SendKeys('"+command$+"')")
Delay(50)

oScript\Release()
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.
PB 5.60 - Windows 10