Jump to content

how i know au3 info for under the group objects?


Go to solution Solved by Mat,

Recommended Posts

Hi my friends, i m sorry for my bad english :)

i have problem, i want know button class info at gui,

how i know au3 info for under the group objects?

#include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    Opt("GUIOnEventMode", 1)
    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Autoit", 233, 112, 192, 124)
    GUISetOnEvent($GUI_EVENT_CLOSE, "Form1Close")
    $Button1 = GUICtrlCreateButton("Buton 1", 40, 25, 139, 30)
    GUICtrlSetOnEvent(-1, "Button1Click")
     
    $Button2 = GUICtrlCreateButton("Buton 1", 40, 61, 139, 30)
    GUICtrlSetOnEvent(-1, "Button2Click")
     
    $Group1 = GUICtrlCreateGroup("Örnek", 8, 8, 209, 89)
    GUICtrlCreateGroup("", -99, -99, 1, 1)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
     
    While 1
    Sleep(100)
    WEnd
     
    Func Button1Click()
    MsgBox(64,"Uyarı","Deneme1")
    EndFunc
     
    Func Button2Click()
    MsgBox(64,"Uyarı","Deneme2")
    EndFunc
     
    Func Form1Close()
    Exit
    EndFunc
Link to comment
Share on other sites

i want know button class info at gui,

how i know au3 info for under the group objects?

 

What do you mean by that.

If you want to retrieve an unique identifier of the control the event occurred from use @GUI_CtrlId or @GUI_CtrlHandle from the respective function.

for receiving class info use _WinAPI_GetClassName check it from the helpfile

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

  • Moderators

AdemSezgin,

Create the group before the buttons - then you can access the buttons correctly with the Window Info tool. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see 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

 

Link to comment
Share on other sites

The reason you are seeing that is because a Group control, is in fact a Button control. I have no idea why, but some time in the distant past someone at Microsoft thought it would be a good idea.

Why do you need to get the ClassnameNN? Surely this is of no use to you internally when you have the control Id?

Edited by Mat
Link to comment
Share on other sites

just use with combination of Class and Instance

ControlClick("", "", "[CLASS:Button;INSTANCE:3]")

from the help file

One or more properties are used in the controlID parameter of a control command in the format:

[PROPERTY1:Value1; PROPERTY2:Value2]

Note: If this special format is not used then the parameter is taken to be a control ID (if numeric) or the ClassnameNN/text of the control (if a string). Although the special format is more longwinded than these methods it is much less ambiguous.

If a Value must contain a ";" it must be doubled.

 

Search Controls in the helpfile for more information

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

just use with combination of Class and Instance

ControlClick("", "", "[CLASS:Button;INSTANCE:3]")

from the help file

Search Controls in the helpfile for more information

No :) i know this ,  i dont know au3 infos at buttons :)  how i get? because buttons is under at group object

Link to comment
Share on other sites

  • Solution

PhoenixXL, I think the OP wants to be able to use the autoit info tool to detect the details of the button, but can't because of the group control.

There are a couple of options:

1: Hide the group. Just run this code before using the autoit info tool:

ControlHide("Autoit", "", "Button3")

2: Get a more powerful info tool. Spy++ allows you to see window hierarchies, which would make this very easy to do. Unfortunately Spy++ is a more advanced tool and is not quite as easy to do.

3: Do it manually. This is very complicated and probably not necessary, but look at _WinAPI_EnumChildWindows if you want to get the handles to all the children of a window.

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