LurchMan Posted January 13, 2009 Share Posted January 13, 2009 (edited) hey guys can you tell me what wrong with this where its commented.... #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiEdit.au3> #include <StaticConstants.au3> GUICreate("Reason for Reset", 547, 154, 238, 237) GUISetOnEvent($GUI_EVENT_CLOSE, "Cancel_Click") GUICtrlCreateLabel("Please enter your reason for reseting the button to run it again:", 128, 16, 291, 17) $ReasonIn = GUICtrlCreateInput("", 48, 48, 449, 21) $Ok = GUICtrlCreateButton("OK", 144, 96, 121, 33, 0 ,$BS_DEFPUSHBUTTON) ;*****************This doesn't work $Cancel = GUICtrlCreateButton("Cancel", 288, 96, 121, 33, 0) GUISetState(@SW_SHOW) GUICtrlSetOnEvent($Ok, "OkClick") GUICtrlSetOnEvent($Cancel, "Cancel_Click") (I know I've got too many Includes at the top also...I just copy n pasted them from the script this came from) When I run it, if i press the enter key it doesn't do anything. All help will be appreciated BUMP - I looked closer at it once i posted it and got it working Edited January 13, 2009 by LurchMan Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end. Link to comment Share on other sites More sharing options...
KaFu Posted January 13, 2009 Share Posted January 13, 2009 #include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Include <GuiEdit.au3> #include <StaticConstants.au3> Opt("GUIOnEventMode", 1) GUICreate("Reason for Reset", 547, 154, 238, 237) GUISetOnEvent($GUI_EVENT_CLOSE, "Cancel_Click") GUICtrlCreateLabel("Please enter your reason for reseting the button to run it again:", 128, 16, 291, 17) $ReasonIn = GUICtrlCreateInput("", 48, 48, 449, 21) $Ok = GUICtrlCreateButton("OK", 144, 96, 121, 33, $BS_DEFPUSHBUTTON) ;*****************This doesn't work $Cancel = GUICtrlCreateButton("Cancel", 288, 96, 121, 33, 0) GUISetState(@SW_SHOW) GUICtrlSetOnEvent($Ok, "OkClick") GUICtrlSetOnEvent($Cancel, "Cancel_Click") while 1 sleep(10) WEnd func OkClick() MsgBox(0,"","Ok clicked") EndFunc func Cancel_Click() MsgBox(0,"","Cancel clicked") EndFunc OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) 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