Jump to content
Sign in to follow this  
Dimax

Control handles

Recommended Posts

Dimax

Anything specific you'd like to ask Larry cappy? 'Can you give us an example' is quite broad.

Sorry to exhumate a long-gone post but, I thought it was better than opening a new thread for a little thing.

I do have something to ask Larry: how do you get control handles - not using "below mouse"?

If anyone knows that, great, and if you can help me, thanks. I'm going crazy.

Share this post


Link to post
Share on other sites
Melba23

Dimax,

 

Sorry to exhumate a long-gone post but, I thought it was better than opening a new thread for a little thing

Wrong - please open a new thread next time. ;)

M23

P.S. The original thread in which this was posted - dating from 2006! :o

Edited by Melba23

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
Dimax

Dimax,

 

Wrong - please open a new thread next time. ;)

M23

P.S. The original thread in which this was posted - dating from 2006! :o

 

I know, it's a bit old :sweating: ... that's why I used that expression :P

I'll do that the next times, thanks for the tip.

But now the post is a thread it has been taken off its context, so I need to clarify:

I am trying to use ControlGetHandle with Lync windows.

>>>> Window <<<<
Title:  Lastname, Firstname
Class:  LyncConversationWindowClass
Position:   305, 307
Size:   430, 430
Style:  0x160F0000
ExStyle:    0x00010100
Handle: 0x00010CEC

>>>> Control <<<<
Class:  NetUIHWND
Instance:   1
ClassnameNN:    NetUIHWND1
Name:   
Advanced (Class):   [CLASS:NetUIHWND; INSTANCE:1]
ID: 
Text:   
Position:   0, 0
Size:   428, 428
ControlClick Coords:    209, 77
Style:  0x56000000
ExStyle:    0x00000000
Handle: 0x00010CF8

If i go 

ControlGetHandle("[Class:NetUIHWND]", "", "[Class:NetUIHWND1]") 

I get nothing.

The last line of the Au3Info tool is giving me the right handle to that control.

I suppose it's getting it from "below mouse". How can I get that handle without using the mouse, just the class and instance?

Thanks!

Edited by Dimax

Share this post


Link to post
Share on other sites
Dimax

I got my answer.

$clase = "LyncConversationWindowClass"
Func contarVentanas()
    Local $INSTANCES = 1
    While WinExists("[Class:"&$clase&";INSTANCE:" & $INSTANCES & "]")
        ConsoleWrite(@CRLF & $clase & " - " & $INSTANCES & ": " & _
        WinGetHandle("[Class:"&$clase&";INSTANCE:" & $INSTANCES & "]") & " -- " & _
        ControlGetHandle("[Class:"&$clase&";INSTANCE:" & $INSTANCES & "]" , "" ,"[CLASS:NetUIHWND]") & " ** "& _
        WinGetTitle("[Class:"&$clase&";INSTANCE:" & $INSTANCES & "]") & @LF _
        )
        $INSTANCES += 1
    WEnd
    ConsoleWrite(@CRLF & "!contarVentanas() sale con INSTANCES = " & $INSTANCES - 1& @CRLF)
    Return $INSTANCES - 1
EndFunc

This is giving me what I want.

Edited by Dimax

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  

×