Download
Updated to version 0.0.2 Beta
- A few bugs squished
- Test script changed to use tooltip to display word
; GetWordUnderMouse Test Script ; only Edit controls currently supported ; -------------------------------------- ; Place the mouse over text in an edit control to ; retrieve the current word under the mouse. ; -------------------------------------- #Persistent ; Open this script in notepad for testing... Run, Notepad %A_ScriptFullPath% SetTimer, disp, 200 Return ^j:: SetTimer, disp, Off ToolTip ExitApp Return disp: delimiter1 = "%A_Space%```(`)`,.`=/\+-*!@#$`%^&*?<>~`;`:`{`}`[`] word := GetWordUnderMouse(delimiter1) ToolTip, %word% Return GetWordUnderMouse(delim) { ; delim = character(s) specified to separate words ; if no delimiter character(s) specified then the entire line of text ; under the mouse pointer will be returned. VarSetCapacity(word, 2048) RetVal := DllCall("gwrd.dll\GetWord", "str", word, "str", delim, "Uint") ; The DLL returns the handle to the control the mouse is over Return, %word% }
(WARNING - Beta version - Use at your own risk )