litlmike Posted February 22, 2006 Share Posted February 22, 2006 I just want to have the GUI close/exit when the user clicks the done button. How do I do that?#include <GUIConstants.au3>;Make GUIGUICreate ( "Input Proposal Info", 225, 250)GUISetState (@SW_SHOW) ; will display an empty dialog box;Make first Combo Box$cat_1 = GUICtrlCreateCombo ( "Pick A Category", 10, 10) GUICtrlSetData(-1,"item1|item2|item3"); Set data in Combo Box;Second Combo Box$cat_2 = GUICtrlCreateCombo ( "Pick A Category", 10, 50) GUICtrlSetData(-1,"item1|item2|item3"); Set data in Combo Box;Third Combo Box$cat_3 = GUICtrlCreateCombo ( "Pick A Category", 10, 90) GUICtrlSetData(-1,"item1|item2|item3"); Set data in Combo Box;Make Discount Input Box$discount = GUICtrlCreateInput ( "Enter Discount", 10, 130) ;Make Done Button$done = GUICtrlCreateButton ( "Done", 75, 170,75,50)GUISetState () ; will display an empty dialog box; Run the GUI until the dialog is closedDo $msg = GUIGetMsg() if $msg = $cat_1 then GUICtrlRead($cat_1); get the value GUICtrlRead($discount) ; get the value endif if $msg = $cat_2 then GUICtrlRead($cat_2); get the value GUICtrlRead($discount); get the value endif if $msg = $cat_3 then GUICtrlRead($cat_3); get the value GUICtrlRead($discount); get the value endif Until $msg = $GUI_EVENT_CLOSE _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Valuater Posted February 22, 2006 Share Posted February 22, 2006 like this expandcollapse popup#include <GUIConstants.au3> ;Make GUI GUICreate ( "Input Proposal Info", 225, 250) GUISetState (@SW_SHOW); will display an empty dialog box ;Make first Combo Box $cat_1 = GUICtrlCreateCombo ( "Pick A Category", 10, 10) GUICtrlSetData(-1,"item1|item2|item3"); Set data in Combo Box ;Second Combo Box $cat_2 = GUICtrlCreateCombo ( "Pick A Category", 10, 50) GUICtrlSetData(-1,"item1|item2|item3"); Set data in Combo Box ;Third Combo Box $cat_3 = GUICtrlCreateCombo ( "Pick A Category", 10, 90) GUICtrlSetData(-1,"item1|item2|item3"); Set data in Combo Box ;Make Discount Input Box $discount = GUICtrlCreateInput ( "Enter Discount", 10, 130) ;Make Done Button $done = GUICtrlCreateButton ( "Done", 75, 170,75,50) GUISetState (); will display an empty dialog box ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() If $msg = $done Then Exit if $msg = $cat_1 then GUICtrlRead($cat_1); get the value GUICtrlRead($discount); get the value endif if $msg = $cat_2 then GUICtrlRead($cat_2); get the value GUICtrlRead($discount); get the value endif if $msg = $cat_3 then GUICtrlRead($cat_3); get the value GUICtrlRead($discount); get the value endif Until $msg = $GUI_EVENT_CLOSE 8) Link to comment Share on other sites More sharing options...
litlmike Posted February 22, 2006 Author Share Posted February 22, 2006 Holy Cow! Thanks! *gives him a cookie* That is too easy. I was making it way to hard on myself. _ArrayPermute()_ArrayUnique()Excel.au3 UDF Link to comment Share on other sites More sharing options...
Valuater Posted February 22, 2006 Share Posted February 22, 2006 New to AutoIt ? A Great Place To Start:==> Welcome to AutoIt 1-2-3 <==8) 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