Batman Posted December 14, 2004 Share Posted December 14, 2004 #include <GUIConstants.au3> GUICreate ("Quick Launch", 200, 100) GUICtrlCreateLabel("Select Programme", 10 , 10) $Andybot = GUICtrlCreateButton ("AndyBot", 25, 25, 90) $DiabloII = GUICtrlCreateButton ("Diablo II", 25, 49, 90) GuiSetState(@SW_SHOW) While 1 $msg = GUIGetMsg ( ) If $msg = $Andybot Then MsgBox(0, "Andybot.exe", "You Selected Abot.exe in the future it will run") ExitLoop Wend While 1 $msg = GUIGetMsg ( ) If $msg = $DiabloII Then MsgBox(0, "DiabloII.exe", "You Selected DiabloII.exe in the future it will run") ExitLoop Wend Script~ Should i be using something else other than Then and ifs? i tried select and it didnt work either War does not determine who is right, it determines who is left. Link to comment Share on other sites More sharing options...
therks Posted December 14, 2004 Share Posted December 14, 2004 (edited) #include <GUIConstants.au3> GUICreate ("Quick Launch", 200, 100) GUICtrlCreateLabel("Select Programme", 10 , 10) $Andybot = GUICtrlCreateButton ("AndyBot", 25, 25, 90) $DiabloII = GUICtrlCreateButton ("Diablo II", 25, 49, 90) GuiSetState(@SW_SHOW) While 1 $msg = GUIGetMsg () If $msg = $Andybot Then; If $Andybot button is clicked. MsgBox(0, "Andybot.exe", "You Selected Abot.exe in the future it will run") ExitLoop ElseIf $msg = $DiabloII Then; If $DiabloII button is clicked. MsgBox(0, "DiabloII.exe", "You Selected DiabloII.exe in the future it will run") ExitLoop EndIf Wend Not totally sure what you wanted, but it looks to me like you want to click a button, then have the GUI close. So that's what this does. Try that. Edited December 14, 2004 by Saunders My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Batman Posted December 14, 2004 Author Share Posted December 14, 2004 Yeah thnx, i didnt know of ElseIf thanks War does not determine who is right, it determines who is left. 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