Jump to content
Sign in to follow this  
litlmike

Enter info into GUI then Paste

Recommended Posts

litlmike

Im kinda new to this, so please forgive my erroneous ways.

Looking to do the following:

Make a GUI that allows the user to select/type a few things, so that my other script can paste the info into the appropriate fields. So, GUI opens, and the user can choose from 1 of 3 drop-down boxes (no more than 1), and also enter in a 'Discount'. The info would need to be stored in a variable for pasting later. Please help.

Here is what I have so far, but I think I am way off track, and its probably all crap. I am sure there are some easier ways to accomplish this. Feel free to scrap it all.

#include <GUIConstants.au3>

;declare variables for category and discount;; not sure i need this

Dim $val_cat1,$val_discount

GUICreate ( "Select a Category", 400, 300) ; will create a dialog box that when displayed is centered

GUISetState (@SW_SHOW) ; will display an empty dialog box

GUICtrlCreateCombo ("Category 1 Title",10,10, 200)

GUICtrlSetData(-1,"Option 1|Option 2|Option 3") ; add other item; i need 30 options, is the only way to type them all out?

GUICtrlCreateCombo ("Category 2 Title",10,50, 200)

GUICtrlSetData(-1,"Option 1b|Option 2b|Option 3b") ; add other item

GUICtrlCreateCombo ("Category 3 Title",10,90, 200)

GUICtrlSetData(-1,"Option 1c|Option 2c|Option 3c|") ; add other item

$val_discount = GUICtrlCreateInput ( "Enter Discount", 10, 130, 200) ;;think this is wrong too

; Run the GUI until the dialog is closed

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×