6

When in Windows 7 I double-click in the text aaa.bbb, either aaa or bbb get selected but not both, so the selected text is that part only and not the whole string aaa.bbb.

As another example, double-clicking anywhere something of the form aaa_bbb selects the entire word - i.e. the character _ does not work as a separator.

Is there a way to change or add in Windows what delimiters are considered as word separators?

Robotnik
  • 2,645
Belgi
  • 797

2 Answers2

3

There is no one unified mechanism in Windows for handling text selection. When issuing a double-click to a program, it receives that event and handles it using its own logic and code. Therefore you will get different behaviors from different programs. The results will be, for example, different in Notepad, Wordpad, Word etc. Even within Office, there will be differences on behavior and options between Word and Excel etc.

You will need to build a mechanism that intercepts double-click and does its own trick. A good tool would be AutoHotkey with which you could write a script that converts the double-click into a series of operations on the active program.

You will need to make certain assumptions on the user-interface, which might not apply to all programs, and you will need a mechanism for extracting data from the programs - for me the only universal one is the clipboard. This will conflict with any product that manages clipboard history, since you will be filling up its history list with partial data.

You will need to assume that the target program follows the usual conventions for moving the cursor and selecting characters.

The AutoHotkey script that you will write will do:

  • Intercept the double-click while remembering the target window and the X-Y coordinates of the click
  • Send a simple click to theses coordinates
  • Send Shift+Home to select all characters to the left
  • Send Ctrl+C to copy the characters and find out the number of characters L to select on the left
  • Send another simple click to theses coordinates
  • Send Shift+End to select all characters to the right
  • Send Ctrl+C to copy the characters and find out the number of characters R to select on the right
  • Send again a simple click to theses coordinates
  • Send L times a Left arrow
  • Send L+R times Shift+Right to do the selection
  • Done.

Remember to add a few milliseconds wait after issuing keys, to allow the target program the time to process them.

harrymc
  • 498,455
0

I understand your question. I don't think you can change what Word thinks of as a word unit. However, if you want more consistent behavior, you could go into Options -> Advanced, and uncheck the second item, "When selecting, automatically select entire word".