In the translation software SDL Trados, the first part (i.e. double-clicking to select a word) works, but words are not added to the selection when the cursor is then dragged over the rest of the words. To select multiple whole words, the user has to press Ctrl + Shift + Right / Left, increasing the selection word by word by pressing an arrow key.
Because SDL Trados has this limitation, I am trying to create a script to select multiple words with the mouse in this software. The following are the suggested steps:
1) When the user makes a left click, send a click again (in order to select a whole word).
2) While the user continues holding the left mouse button and moves the cursor to the left or right by at least 50 pixels, send {LCtrl Down}{LShift Down}{Left / Right}{LShift Up}{LCtrl Up} to select the next word (in the direction in which the user has moved the cursor by at least 50 pixels).
3) If the user further moves the cursor 50 pixels either to the left or right, repeat step 2 above.
I have been able to write only the first part of the script, because I do not know how to write the commands which have to do with counting pixels when the cursor is moved:
Code: Select all
#IfWinExist ahk_exe SDLTradosStudio.exe
~LButton::
Click, Left, , Up
click 1 ; send an additional click to select a whole word
return ; I am not sure whether the Return command is to be put here or in another place
… … … ; this is where the commands for detecting mouse moves and counting pixels are to be written
#IfWinExist