Skorpius666 Posted September 6, 2012 Author Share Posted September 6, 2012 (edited) here's my take on it. expandcollapse popup; *** Start added by AutoIt3Wrapper *** #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> ; *** End added by AutoIt3Wrapper *** #cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.8.1 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #AutoIt3Wrapper_Add_Constants=n Global $msg, $mainMenu, $wButton, $mainMenu1, $Welcome, $Intro Intro1() mainMenu1() startHere1() intro1() mainMenu1() startHere1() Func intro1() $Intro = GUICreate("Welcome", 472, 309, 192, 124) $Label1 = GUICtrlCreateLabel("Welcome to the TruTops Programming Guide.", 45, 8, 400, 34, $SS_CENTER) GUICtrlSetFont(-1, 20, 800, 2, "AriaScriptSSK") $Label2 = GUICtrlCreateLabel("This guide was created to help the user in programming TruTops Mark.", 67, 56, 337, 17, $SS_CENTER) $Label3 = GUICtrlCreateLabel("We will go through all of the steps of each programming option in the TruTops Mark Program itself.", 3, 72, 465, 17, $SS_CENTER) $Label4 = GUICtrlCreateLabel("First, If you noticed, the door to the machine has already opened.", 80, 88, 310, 17, $SS_CENTER) $Label5 = GUICtrlCreateLabel("Before we begin, please clear off anything that may be in the way of the table movement.", 24, 104, 422, 17, $SS_CENTER) $Label6 = GUICtrlCreateLabel("Also, clear off the table with the acception of the A-Axis and the guide blocks that are in place.", 11, 120, 448, 17, $SS_CENTER) $Label7 = GUICtrlCreateLabel("Once that is done, Please proceed and click OK", 119, 136, 232, 17, $SS_CENTER) $Button1 = GUICtrlCreateButton("Continue", 104, 216, 75, 25) $Button2 = GUICtrlCreateButton("Exit", 296, 216, 75, 25) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $Button2 Exit Case $msg = $Button1 GUISetState(@SW_HIDE, $Intro) mainMenu1() GUISetState(@SW_SHOW, $Intro) Case $msg = $Button1 EndSelect WEnd EndFunc ;==>intro1 Func mainMenu1() $mainMenu = GUICreate("Main Menu", 320, 282, 193, 125, -1, -1, $Welcome) $Label1 = GUICtrlCreateLabel("Please select a starting point below.", 73, 16, 173, 17) $Label2 = GUICtrlCreateLabel("Each button will open a more in depth set of options.", 34, 48, 251, 17) $startHere = GUICtrlCreateButton("Start Here", 122, 88, 75, 25) $axisCommands = GUICtrlCreateButton("Axis Commands", 114, 120, 91, 25) $markCommands = GUICtrlCreateButton("Mark Commands", 110, 152, 99, 25) $systemCommands = GUICtrlCreateButton("System Commands", 110, 184, 99, 25) $exit = GUICtrlCreateButton("Exit", 122, 216, 75, 25) GUISetState() While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $exit GUIDelete() Return Case $msg = $startHere GUISetState(@SW_HIDE,$mainMenu) startHere1() GUISetState(@SW_SHOW, $mainMenu) EndSelect WEnd EndFunc ;==>mainMenu1 Func startHere1() $pgStartHere = GUICreate("Start Here", 566, 525, 192, 124) $Edit1 = GUICtrlCreateEdit("", 32, 24, 489, 441, $ES_CENTER, $ES_READONLY) GUICtrlSetData(-1, StringFormat("This is Text"), $ES_READONLY) $_mainMenu = GUICtrlCreateButton("Main Menu", 120, 480, 75, 25) $exit = GUICtrlCreateButton("Exit", 360, 480, 75, 25) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE Exit Case $msg = $exit Exit Case $msg = $_mainMenu GUIDelete() Return EndSelect WEnd EndFunc ;==>startHere1 Hey BrewManNH, That was exactly what I was trying to do. Thank you so much. I noticed that trying this code on XP works, but why wouldn't it work on Vista. I don't use Vista much, but was just curious. Again, I really appreciate the help. I was also wondering. What is AutoIT wrapper. I've heard of it, but not sure what it is used for. Edited September 6, 2012 by Skorpius666 Link to comment Share on other sites More sharing options...
BrewManNH Posted September 6, 2012 Share Posted September 6, 2012 Hey BrewManNH,That was exactly what I was trying to do. Thank you so much. I noticed that trying this code on XP works, but why wouldn't it work on Vista. I don't use Vista much, but was just curious.Again, I really appreciate the help.I was also wondering. What is AutoIT wrapper. I've heard of it, but not sure what it is used for.There's no reason why this won't work on Vista, I'm running it on Windows 7 and it works. The AutoIt3Wrapper directives/comments are there because your original script when posted lost the #include file names, so instead of going through all of the effort to find the constants you used, I used the directive that automatically adds the proper constants files to the #include list.AutoIt3Wrapper is the program that gets called when you run your script, or when you compile the script, from Scite. It reads the directives, if any, and acts on them before actually running/compiling the script. In Scite if you hit CTRL-F7, or go to the Tools menu and selecting Compile, with a saved *.au3 file, it will open up the GUI for setting some of the parameters for running your script. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator 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