randeep Posted June 11, 2009 Share Posted June 11, 2009 hello all pls suggest how to remove or disable "Close" ("X") button from a msgbox. thanx in advance randeep [font="Palatino Linotype"]Randeep Singh[/font][sub][/sub] Link to comment Share on other sites More sharing options...
MrCreatoR Posted June 11, 2009 Share Posted June 11, 2009 It's disabled when needed, i.e: when there is more than one button and no «Cancel» button: MsgBox(3, "Question", "Are you sure?") MsgBox(4, "Question", "Are you sure?") Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1 AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ================================================== AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
randeep Posted June 11, 2009 Author Share Posted June 11, 2009 (edited) actually i am making the following script. i want that when the second window (You are going to configure a Single-site), if we press 'cancel' or 'x' button then we should go to the previous window 'T-MATRIX OSQL Utility'. similary if we press 'X' on 3rd window ("Please place the Data Base scripts at the path 'C:\T-Matrix\Scripts' & the supporting files in 'C:\T-Matrix.")it should come back to the 2nd window(You are going to configure a Single-site). pls help thanx in advance expandcollapse popup#include <GUIConstantsEx.au3> Local $Site0, $Site1, $msg, $InputWindowHandle Local $RetValue run("net share C$=C:\") $InputWindowHandle = GUICreate("T-MATRIX OSQL Utility", 203, 135, -1, -1) ;creates main window. GUICtrlCreateGroup("Please Select", 30, 10, 145, 100) $Site0 = GUICtrlCreateRadio("Single-Site", 65, 40, 70) $Site1 = GUICtrlCreateRadio("Multi-Sites", 65, 70, 70) GUISetState() While 1 $msg = GUIGetMsg() ;ConsoleWrite("aaaaa") Select Case $msg = $Site0 And BitAND(GUICtrlRead($Site0), $GUI_CHECKED) $RetValue = MsgBox(1, 'Please Confirm', 'You are going to configure a Single-site.') If $RetValue = 2 Then ;if 'Ok' is pressed then $msg = GUIGetMsg() ;close the window with msg = invalid value. continuecase EndIf $RetValue = MsgBox(1, "Info", "Please place the Data Base scripts at the path 'C:\T-Matrix\Scripts' & the supporting files in 'C:\T-Matrix.") If $RetValue = 2 Then ;if 'Ok' is pressed then $msg = GUIGetMsg() ;close the window with msg = invalid value. continuecase EndIf Case $msg = $Site1 And BitAND(GUICtrlRead($Site1), $GUI_CHECKED) $RetValue = MsgBox(1, 'Info:', 'You are going to configure Multi-sites.') If $RetValue = 2 Then $msg = GUIGetMsg() ContinueCase EndIf $RetValue = MsgBox(0, "Warning", "Please place the Data Base scripts at the path 'C:\T-Matrix\Database' & the supporting files in 'C:\T-Matrix.") if $RetValue = False Then $msg = GUIGetMsg() ContinueCase EndIf Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect ;consolewrite("123") ;GUIDelete($InputWindowHandle) ;WinWaitClose("T-MATRIX OSQL Utility") WEndƒoÝŠ÷ Ú«¨µéÚ™ Edited June 11, 2009 by randeep [font="Palatino Linotype"]Randeep Singh[/font][sub][/sub] Link to comment Share on other sites More sharing options...
randeep Posted June 11, 2009 Author Share Posted June 11, 2009 (edited) now if i click 'cancel' on the window 'you are going to configure single site' then it goes to 'you are going to configure multiple sites'. it seems that it is happening due to 'continuecase'. and if i press 'X' button then the program just 'exits'. but i should come to main window as i used 'exitloop' i need to return to main window if i press 'cancel'. thanx in advance randeep Edited June 11, 2009 by randeep [font="Palatino Linotype"]Randeep Singh[/font][sub][/sub] 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