Jump to content

How to get ControlID when mouse click


Fuco
 Share

Recommended Posts

I modify some guy's script FindClass.au3 to get a ControlID , but it not meet my requirment.

I need to get the ControlID of a edit control when i use mouse to click it, and especially the control is not focus. (it is not editable)

Exactly, I would like to click on a non-focus control and send its ControlText to clipboard.

Following is my script , any infomation is appreciation.

=======================

HotKeySet("{PAUSE}", "Terminate")

While 1

$sTitle = WinGetTitle("","")

WinActivate($sTitle, "")

$sCtlText = ""

If StringInStr ($sTitle, "(frm" ,1) <> 0 Then

$sCtl = ControlGetFocus( $sTitle ,"")

$sCtlText = ControlGetText($sTitle,"", $sCtl)

ClipPut($sCtlText)

EndIf

WEnd

Func Terminate()

Exit 0

EndFunc

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...