Jump to content
Sign in to follow this  

Getting a list of all ControlID

Recommended Posts


How can I get a list of all ControlIDs for a given Window title? Also, is there a way to get the type of said ID, like textbox, radio, button, dropdown, etc? I would like the extract the text from all of the textbox's.


Maybe this does it?? Although, it does not seems to return anything useful.

Dim $slots[4096]
    Dim $textbox

    Dim $title = WinGetTitle("")

    Dim $data = WinGetClassList($title, "")

    Dim $fp = FileOpen("oc.txt",2)
    $slots = StringSplit( $data, @LF )
    MsgBox(0,"slots:", $slots[0])
    for $i = 1 to $slots[0]
        FileWriteLine($fp, $slots[$i] & @TAB & ControlGetText($title, "", $slots[$i]))




Edited by jftuga

Share this post

Link to post
Share on other sites

I just wrote a _ControlGetNumberedClassList() UDF which can give you an array of ClassNameNNs. It includes an example on how to grab all of the text from a window. Perhaps it will suit your needs nicely?

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