Jump to content

help with aligning GUI


sbrady
 Share

Recommended Posts

here is a screenshot of my GUI.

1. I need only 1 text box not 2

2. It would be nice if the text were selected

3. center all buttons and the text box

4. the 8th button got cut off, I need the GUI window taller.

Posted Image

; GUI create

#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>

Example()

Func Example()
Local $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8, $msg, $btn
GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered
$file = GUICtrlCreateInput("", 10, 5, 300, 20)
GUICtrlCreateInput("AR123 Smith, Bob", 10, 35, 300, 20) ; will not accept drag&drop files
$btn = GUICtrlCreateButton("Ok", 40, 75, 60, 20)

Opt("GUICoordMode", 2)
$Button_1 = GUICtrlCreateButton(" 1. A-D Features", 10, 30, 120,30, $BS_LEFT)
$Button_2 = GUICtrlCreateButton(" 2. E-K Features", -120, 10, 120,30, $BS_LEFT)
$Button_3 = GUICtrlCreateButton(" 3. L-O Features", -120, 10, 120,30, $BS_LEFT)
$Button_4 = GUICtrlCreateButton(" 4. P-Z Features", -120, 10, 120,30, $BS_LEFT)
$Button_5 = GUICtrlCreateButton(" 5. A-D Telethon", -120, 10, 120,30, $BS_LEFT)
$Button_6 = GUICtrlCreateButton(" 6. E-K Telethon", -120, 10, 120,30, $BS_LEFT)
$Button_7 = GUICtrlCreateButton(" 7. L-O Telethon", -120, 10, 120,30, $BS_LEFT)
$Button_8 = GUICtrlCreateButton(" 8. P-Z Telethon", -120, 10, 120,30, $BS_LEFT)

GUISetState() ; will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1
MsgBox(0, 'Desktop Prep Begins', 'Desktop Prep Begins') ; Will Run/Open Notepad
Case $msg = $Button_2
MsgBox(0, 'Open AM', 'Open AM was pressed') ; Will demonstrate Button 2 being pressed
Case $msg = $Button_3
MsgBox(0, 'NDP AM', 'NDP AM was pressed') ; Will demonstrate Button 3 being pressed
Case $msg = $Button_4
MsgBox(0, 'BUMP AM', 'Bump AM was pressed') ; Will demonstrate Button 4 being pressed
Case $msg = $Button_5
MsgBox(0, '7CI AM', '7CIOPEN AM was pressed') ; Will demonstrate Button 5 being pressed
Case $msg = $Button_6
MsgBox(0, '7CI AM', '7CINDP AM was pressed') ; Will demonstrate Button 6 being pressed
Case $msg = $Button_7
MsgBox(0, '7CI AM', '7CINDPC AM was pressed') ; Will demonstrate Button 7 being pressed
Case $msg = $Button_8
MsgBox(0, 'E-mail & DMG', 'E-mail/DMG was pressed') ; Will demonstrate Button 8 being pressed
EndSelect
WEnd
EndFunc ;==>Example
Link to comment
Share on other sites

You could use Koda (SciTE -> tools), paste the GUI code from your script and import it into Koda. Koda allows to allign controls etc. and generates new AutoIt GUI code for you.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I'd suggest looking at the help file, as has been suggested to you numerous times, and see how to change the settings of the size of your GUI. Right now, you're using the default size for it.

Also, if you don't want two input boxes then why in the world did you create 2? Create one and done.

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 Gude
How 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

1. how do I get just 1 text box

2. how do I get a desktop folder window to open, for example, if the user selects button 1, I need for the folder

"Apacefeatures1active_projects_a-d FEATURES" to open.

3. how do I return the text entered in the text box to a variable

Posted Image

; GUI create
#include <GUIConstantsEx.au3>
#include <ButtonConstants.au3>
Example()
Func Example()
    Local $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8, $msg
    GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered
    $file = GUICtrlCreateInput("", 10, 5, 300, 20)
    GUICtrlCreateInput("AR123 Smith, Bob", 10, 35, 300, 20) ; will not accept drag&drop files

    Opt("GUICoordMode", 2)
    $Button_1 = GUICtrlCreateButton(" 1. A-D Features", -200, 30, 120,30, $BS_LEFT)
    $Button_2 = GUICtrlCreateButton(" 2. E-K Features",  -120, 10, 120,30, $BS_LEFT)
    $Button_3 = GUICtrlCreateButton(" 3. L-O Features",  -120, 10, 120,30, $BS_LEFT)
    $Button_4 = GUICtrlCreateButton(" 4. P-Z Features",  -120, 10, 120,30, $BS_LEFT)
    $Button_5 = GUICtrlCreateButton(" 5. A-D Telethon", -120, 10, 120,30, $BS_LEFT)
    $Button_6 = GUICtrlCreateButton(" 6. E-K Telethon",  -120, 10, 120,30, $BS_LEFT)
$Button_7 = GUICtrlCreateButton(" 7. L-O Telethon",  -120, 10, 120,30, $BS_LEFT)
$Button_8 = GUICtrlCreateButton(" 8. P-Z Telethon", -120, 10, 120,30, $BS_LEFT)
  
    GUISetState() ; will display an  dialog box with 2 button
    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()
        Select
            Case $msg = $GUI_EVENT_CLOSE
                ExitLoop
            Case $msg = $Button_1 ; A-D Features
                DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name)
       DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Nuendo Project")
       DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Final Cut 7")
       DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS6")
       DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS5.5")
       DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS5")
       DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS4")
       DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS3")
       DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "_Media Files")
            Case $msg = $Button_2 ;E-K Features
                DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name)
       DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Nuendo Project")
       DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Final Cut 7")
       DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS6")
       DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS5.5")
       DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS5")
       DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS4")
       DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS3")
       DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "_Media Files")
   Case $msg = $Button_3 ; L-O Features
                DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name)
       DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Nuendo Project")
       DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Final Cut 7")
       DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS6")
       DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS5.5")
       DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS5")
       DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS4")
       DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS3")
       DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "_Media Files")
   Case $msg = $Button_4 ; P-Z Features
                DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name)
       DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Nuendo Project")
       DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Final Cut 7")
       DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS6")
       DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS5.5")
       DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS5")
       DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS4")
       DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS3")
       DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "_Media Files")
   Case $msg = $Button_5 ;A-D Telethon
                DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name)
       DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Nuendo Project")
       DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Final Cut 7")
       DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS6")
       DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS5.5")
       DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS5")
       DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS4")
       DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS3")
       DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "_Media Files")
   Case $msg = $Button_6 ;E-K Telethon
       DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name)
       DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Nuendo Project")
       DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Final Cut 7")
       DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS6")
       DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS5.5")
       DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS5")
       DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS4")
       DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS3")
       DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "_Media Files")
   Case $msg = $Button_7 ;L-O Telethon
                DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name)
       DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Nuendo Project")
       DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Final Cut 7")
       DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS6")
       DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS5.5")
       DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS5")
       DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS4")
       DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS3")
       DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "_Media Files")
   Case $msg = $Button_8  ;P-Z Telethon
                DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name)
       DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Nuendo Project")
       DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Final Cut 7")
       DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS6")
       DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS5.5")
       DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS5")
       DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS4")
       DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS3")
       DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "_Media Files")
        EndSelect
    WEnd
EndFunc   ;==>Example
Link to comment
Share on other sites

  • Moderators

sbrady,

- 1. Only use 1 GUICtrlCreateInput line?

- 2. ShellExecute("Path")

- 3. GUICtrlRead

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

1. how do I get just 1 text box

Don't be dumb, read the code and you will know.

Listen to BrewManNH, this questions are really basics and the helpfile will answer to your questions.

Maybe you don't know the definition of making an effort, even I know learning a new language is difficult.

Br, FireFox.

Edited by FireFox
Link to comment
Share on other sites

I'd suggest looking at the help file, as has been suggested to you numerous times, and see how to change the settings of the size of your GUI. Right now, you're using the default size for it.

Also, if you don't want two input boxes then why in the world did you create 2? Create one and done.

I am a newbie, I am learning, I copied and pasted, if you dont have the patience to talk to me like a human being then dont reply to my posts. Why do you assume I dont ever go to the help file, my code is copied straight out of the help file to get me started. Please be kind........dude.

Link to comment
Share on other sites

I get no message box, what am I doing wrong.

#include 

Example()

Func Example()
Local $msg
GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered
GUISetState(@SW_SHOW) ; will display an empty dialog box
$textbox_input = GUICtrlCreateInput("AR123 Smith, Bob", 10, 5, 300, 20)
$gui_data = GUICtrlRead($textbox_input)

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
GUIDelete()


EndFunc ;==>Example


MsgBox(4096,"project name", $gui_data)
Link to comment
Share on other sites

sbrady,

to start learning AutoIt can be so easy :graduated:

Melba tells you "Only use 1 GUICtrlCreateInput line". So have a look at the source and you will see that there are two GUICtrlCreateInput lines. Remove the second pne and see what you get.

Step through the source code and try to understand the statements. Read the help file and play around with the parameters.

So: Play and learn.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I get no message box, what am I doing wrong.

GUISetState(@SW_SHOW) has to be the last statement. Move
$textbox_input = GUICtrlCreateInput("AR123 Smith, Bob", 10, 5, 300, 20)
one line up.
$gui_data = GUICtrlRead($textbox_input)
should be moved into the While/WEnd loop.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • Moderators

sbrady,

Please stop reporting threads where people tell you to read the Help file. You are not being bullied - as I mentioned to you in another thread, given the self-evident lack of effort on your part so far, I am quite frankly amazed that people are still trying to help you. Especially when you appear to ignore much of the advice given to you - did you even read my post above? :huh:

Of the questions you have asked so far in this thread, the majority could have been avoided by you reading the Help file for each of the functions used in your script. For example, the size of the GUI. And as for having 2 input controls - with 2 GUICtrlCreateInput lines surely that is self-evident.

So, please start acting like the intelligent person I am sure you are and start applying some of that intelligence to understanding the code you are using. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

so this is the code that makes 2 input boxes..........change the 2 to a 1

Opt("GUICoordMode", 2)

Don't guess, read!

The help file tells you what this statement is for!

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

I am a newbie so please forgive me if you questions upset you.

I have a lot of code and it is almost complete.

my problem is any text entered into the text box does not carry through the script

I know is in line 13 or 14.

$textbox_input

$new_project_name

do I have to update the input box, why would the script not take whatever text is in there and use it.

; GUI create

#include 
#include 
#include 

Example()

Func Example()
Local $Button_1, $Button_2, $Button_3, $Button_4, $Button_5, $Button_6, $Button_7, $Button_8, $msg
GUICreate("My GUI Button") ; will create a dialog box that when displayed is centered

$textbox_input = GUICtrlCreateInput("", 10, 35, 300, 20) ; will not accept drag&drop files
$new_project_name = GUICtrlRead($textbox_input)

Opt("GUICoordMode", 2)
$Button_1 = GUICtrlCreateButton(" 1. A-D Features", -200, 30, 120,30, $BS_LEFT)
$Button_2 = GUICtrlCreateButton(" 2. E-K Features", -120, 10, 120,30, $BS_LEFT)
$Button_3 = GUICtrlCreateButton(" 3. L-O Features", -120, 10, 120,30, $BS_LEFT)
$Button_4 = GUICtrlCreateButton(" 4. P-Z Features", -120, 10, 120,30, $BS_LEFT)
$Button_5 = GUICtrlCreateButton(" 5. A-D Telethon", -120, 10, 120,30, $BS_LEFT)
$Button_6 = GUICtrlCreateButton(" 6. E-K Telethon", -120, 10, 120,30, $BS_LEFT)
$Button_7 = GUICtrlCreateButton(" 7. L-O Telethon", -120, 10, 120,30, $BS_LEFT)
$Button_8 = GUICtrlCreateButton(" 8. P-Z Telethon", -120, 10, 120,30, $BS_LEFT)

GUISetState() ; will display an dialog box with 2 button

; Run the GUI until the dialog is closed
While 1
$msg = GUIGetMsg()
Select
Case $msg = $GUI_EVENT_CLOSE
ExitLoop
Case $msg = $Button_1 ; A-D Features
DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name)
DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Nuendo Project")
DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Final Cut 7")
DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS6")
DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS5.5")
DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS5")
DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS4")
DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "Pro CS3")
DirCreate("Apacefeatures1active_projects_a-d FEATURES" & $new_project_name & "_Media Files")
Case $msg = $Button_2 ;E-K Features
DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name)
DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Nuendo Project")
DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Final Cut 7")
DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS6")
DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS5.5")
DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS5")
DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS4")
DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "Pro CS3")
DirCreate("Apacefeatures2active_projects_e-k FEATURES" & $new_project_name & "_Media Files")
Case $msg = $Button_3 ; L-O Features
DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name)
DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Nuendo Project")
DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Final Cut 7")
DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS6")
DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS5.5")
DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS5")
DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS4")
DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "Pro CS3")
DirCreate("Apacefeatures2active_projects_l-o FEATURES" & $new_project_name & "_Media Files")
Case $msg = $Button_4 ; P-Z Features
DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name)
DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Nuendo Project")
DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Final Cut 7")
DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS6")
DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS5.5")
DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS5")
DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS4")
DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "Pro CS3")
DirCreate("Apacefeatures2active_projects_p-z FEATURES" & $new_project_name & "_Media Files")
Case $msg = $Button_5 ;A-D Telethon
DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name)
DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Nuendo Project")
DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Final Cut 7")
DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS6")
DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS5.5")
DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS5")
DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS4")
DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "Pro CS3")
DirCreate("Apacefeatures1active_projects_a-d Telethon" & $new_project_name & "_Media Files")
Case $msg = $Button_6 ;E-K Telethon
DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name)
DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Nuendo Project")
DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Final Cut 7")
DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS6")
DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS5.5")
DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS5")
DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS4")
DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "Pro CS3")
DirCreate("Apacefeatures2active_projects_e-k Telethon" & $new_project_name & "_Media Files")
Case $msg = $Button_7 ;L-O Telethon
DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name)
DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Nuendo Project")
DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Final Cut 7")
DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS6")
DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS5.5")
DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS5")
DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS4")
DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "Pro CS3")
DirCreate("Apacefeatures2active_projects_l-o Telethon" & $new_project_name & "_Media Files")
Case $msg = $Button_8 ;P-Z Telethon
DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name)
DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Nuendo Project")
DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Final Cut 7")
DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS6")
DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS5.5")
DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS5")
DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS4")
DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "Pro CS3")
DirCreate("Apacefeatures1active_projects_p-z Telethon" & $new_project_name & "_Media Files")
EndSelect
WEnd
EndFunc ;==>Example
Link to comment
Share on other sites

You need to read the input box's contents when you press the button, where you have that statement now, it reads it right after it's created and never reads from it again. Copy the line where you're reading the contents, and paste it after every one of your Case statements.

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 Gude
How 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

You need to read the input box's contents when you press the button, where you have that statement now, it reads it right after it's created and never reads from it again. Copy the line where you're reading the contents, and paste it after every one of your Case statements.

thank you thank you thank you thank you

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...