JohnBailey Posted February 20, 2007 Share Posted February 20, 2007 If I use onEvent for the gui then how do I use buttons too? I tried the following and looked through the manual, but no "dice" Opt("TrayIconDebug", 1) Opt("GUIOnEventMode", 1) TrayTip("ImageRenamer", "Automatically renames jpgs v1.0", 10, 1) #NoTrayIcon #include <Array.au3> #include <File.au3> #include <GUIConstants.au3> #include <GuiList.au3> $Form1 = GUICreate("Image Renamer", 403, 510, 210, 172) $bRename = GUICtrlCreateButton("Rename", 160, 104, 81, 17, 0) GUISetOnEvent($GUI_EVENT_CLOSE, "close") GUISetOnEvent($bRename, "rAct") GUISetState(@SW_SHOW) While 1 Sleep(10) WEnd Func rAct() MsgBox(0,"Dialog","Rename clicked") EndFunc Func close() Exit EndFunc A decision is a powerful thing Link to comment Share on other sites More sharing options...
xcal Posted February 20, 2007 Share Posted February 20, 2007 For stuff like buttons, it's GUICtrlSetOnEvent. How To Ask Questions The Smart Way Link to comment Share on other sites More sharing options...
JohnBailey Posted February 20, 2007 Author Share Posted February 20, 2007 xcal, geeze I guess I was overlooking the smallest things last night! Thanks as always A decision is a powerful thing 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