Jump to content

Reading the line or the word where mouse pointer is pointing


Recommended Posts

But the mouse pointer does not point to the whole word. So if there was a way it would only read the letter its hovering over.

Maybe doing it so it read the highlighted word?

[right][/right]

Link to comment
Share on other sites

Hi everybody,

Is there any way to read the word or line where mouse pointer is pointing.

Regards,

Ahmady

:P

It depends on the control that holds the word. Is it an edit?
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

But the mouse pointer does not point to the whole word. So if there was a way it would only read the letter its hovering over.

Maybe doing it so it read the highlighted word?

The highlighted word or line is what I am using now but I am looking for a way to sense the whole word or line when pointing to somewhere on it.

Link to comment
Share on other sites

It can be edit or just a web page or an email.

Then maybe somethjing like this

HotKeySet("{F10}", "GetWord")
HotKeySet("{F11}", "GetWord")
HotKeySet("{ESC}","quitall")
While 1
    Sleep(40)
    
WEnd

Func GetWord()
    Local $mp = MouseGetPos()
    Local $clicks = 2
    if @HotKeyPressed ="{F11}" Then $clicks = 3
    MouseClick("left", $mp[0], $mp[1], $clicks)
    Send("^c")
    ConsoleWrite(ClipGet() & @CRLF)
    Sleep(500);need to try different values, 50 is too short for some reason when $clicks = 2
    MouseClick("left",$mp[0], $mp[1])
EndFunc  ;==>GetWord



Func QuitAll()
    Exit
EndFunc

EDIT:simplified by removing a function

Edited by martin
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...