AdemSezgin Posted July 3, 2013 Share Posted July 3, 2013 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 More sharing options...
PhoenixXL Posted July 3, 2013 Share Posted July 3, 2013 (edited) 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 July 3, 2013 by PhoenixXL AdemSezgin 1 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 More sharing options...
AdemSezgin Posted July 3, 2013 Author Share Posted July 3, 2013 No , i did not mean it, how i get button classnameNN info at this gui? because , i see Button1 = Button3 , Button2= Button3 ?? Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 3, 2013 Moderators Share Posted July 3, 2013 AdemSezgin,Create the group before the buttons - then you can access the buttons correctly with the Window Info tool. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Mat Posted July 3, 2013 Share Posted July 3, 2013 (edited) 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 July 3, 2013 by Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
AdemSezgin Posted July 3, 2013 Author Share Posted July 3, 2013 i have program, i want know controlclick buttons, i want know, what i do know ? i didnt creat gui , other people creat Link to comment Share on other sites More sharing options...
AdemSezgin Posted July 3, 2013 Author Share Posted July 3, 2013 do you have idea? Link to comment Share on other sites More sharing options...
PhoenixXL Posted July 3, 2013 Share Posted July 3, 2013 (edited) 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 July 3, 2013 by PhoenixXL AdemSezgin 1 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 More sharing options...
AdemSezgin Posted July 3, 2013 Author Share Posted July 3, 2013 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 More sharing options...
Solution Mat Posted July 3, 2013 Solution Share Posted July 3, 2013 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. AdemSezgin 1 AutoIt Project Listing Link to comment Share on other sites More sharing options...
AdemSezgin Posted July 3, 2013 Author Share Posted July 3, 2013 (edited) wAOVVVV thank you , its good idea ControlHide("Autoit", "", "Button3") ---- i liked it , Edited July 3, 2013 by AdemSezgin Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now