Jump to content
Sign in to follow this  
ahmady

Reading the line or the word where mouse pointer is pointing

Recommended Posts

ahmady

Hi everybody,

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

Regards,

Ahmady

:P

Share this post


Link to post
Share on other sites
Bru

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]

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
Share on other sites
ahmady

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.

Share this post


Link to post
Share on other sites
ahmady

It depends on the control that holds the word. Is it an edit?

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

Share this post


Link to post
Share on other sites
martin

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.

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.