star2 Posted April 29, 2007 Share Posted April 29, 2007 (edited) hey ppl it's - Mr, Alwayas asking - again this time I'm having a hard time making this GUI do what I need I have a Run Command and I want to pop a MsgBox of Failure instade of exiting the GUI the user will press on the button and a MsgBox will tell him that the command is not available here's my GUI #include <GUIConstants.au3> GUICreate("test", 120,70) GUISetFont(12) $send = GUICtrlCreateButton("Run", 25, 25, 50, 25) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $send Then run ("1.exe") EndIf WEnd Edited April 29, 2007 by star2 [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] Link to comment Share on other sites More sharing options...
Zedna Posted April 29, 2007 Share Posted April 29, 2007 Opt("RunErrorsFatal", 0)Look here for example Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
star2 Posted April 29, 2007 Author Share Posted April 29, 2007 I can't thank u enough I was searching but didn't find ur example (nice one) u're always the answer thanks again #include <GUIConstants.au3> GUICreate("test", 120,70) GUISetFont(12) $send = GUICtrlCreateButton("Run", 25, 25, 50, 25) GUISetState() Opt("RunErrorsFatal", 0) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $send Then run ("1.exe") If @error Then MsgBox(48,'Error','Error with Run') EndIf WEnd [quote]Baby you're all that I want, When you're lyin' here in my armsI'm findin' it hard to believe, We're in heavenAnd love is all that I need , And I found it there in your heartIt isn't too hard to see, We're in heaven .Bryan Adams[/quote].............................................................................[u]AUTOIT[/u] 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