WoodGrain 2 Posted April 14, 2005 Hi guys, Could someone please give me a head start with creating a GUI? For my current project I want to prompt the user with a Message type box with a title, description/question & 2 buttons with the button text "Big" and "Small" and the resulting code execution based on which button they press. That'd be a big help - thanks guys. Share this post Link to post Share on other sites
sandyd 0 Posted April 14, 2005 Have a look in the HELP file. Its all there. ----[ SandyD ]--- Share this post Link to post Share on other sites
GaryFrost 18 Posted April 14, 2005 you might want to look at the SciTE editorSciTE SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Share this post Link to post Share on other sites
buzz44 1 Posted April 14, 2005 #include <GUIConstants.au3> GUICreate ( "Insert title Here...", 266,91) GUICtrlCreateLabel ( "Insert question here...", 20, 10, 200, 20) $Big = GUICtrlCreateButton ( "Big", 20, 50, 100) $Small = GUICtrlCreateButton ( "Small", 146, 50, 100) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Big ;Insert Code Here Case $msg = $Small ;Insert Code Here EndSelect Wend That will get you started. Because you wanted custom text on the button we couldnt just use a simple Msgbox() Function as the buttons can only contain set text such as "Yes", "No", "Retry" etc. Instead I had to create a custom GUI window that looks like a message box. qq Share this post Link to post Share on other sites
WoodGrain 2 Posted April 15, 2005 Thanks for that.It's just the kick start I needed to start getting my head around it (as i've only created GUIs visually before).#include <GUIConstants.au3> GUICreate ( "Insert title Here...", 266,91) GUICtrlCreateLabel ( "Insert question here...", 20, 10, 200, 20) $Big = GUICtrlCreateButton ( "Big", 20, 50, 100) $Small = GUICtrlCreateButton ( "Small", 146, 50, 100) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $Big ;Insert Code Here Case $msg = $Small ;Insert Code Here EndSelect WendThat will get you started. Because you wanted custom text on the button we couldnt just use a simple Msgbox() Function as the buttons can only contain set text such as "Yes", "No", "Retry" etc. Instead I had to create a custom GUI window that looks like a message box.<{POST_SNAPBACK}> Share this post Link to post Share on other sites
WoodGrain 2 Posted April 15, 2005 What a great editor - thanks for pointing me to it.I'd been using Crimson Editor until now..you might want to look at the SciTE editorSciTE<{POST_SNAPBACK}> Share this post Link to post Share on other sites