Sign in to follow this  
Followers 0
NSearch

GUIinput Question

4 posts in this topic

How do I get $duplicate_report_name to equal what is entered in the input box, instead of getting "Please Enter Name" every time?

GuiCtrlCreateLabel("Save as:", 60, 257)

$duplicate_report = GUICtrlCreateInput("Please Enter Name", 105, 255, 130)

$duplicate_report_name = GUICtrlRead($duplicate_report)

Thanks.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

That seems fine to me. I think maybe you have line...

$duplicate_report_name = GUICtrlRead($duplicate_report)

Outside of your loop. Put it inside your loop so its constantly up to date, if that doesn't help post your whole code.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

hope the example helps :(

#include <GUIConstants.au3>
$main_gui = GUICreate("testing script", 200, 100)
GUICtrlCreateLabel("Save as:", 5,20,55)
$duplicate_report = GUICtrlCreateInput("Please Enter Name", 60, 20, 130)
$button_create = GUICtrlCreateButton("Duplicate",60,45,60)
$button_close = GUICtrlCreateButton("Close",120,45,60)
GUISetState(@SW_SHOW)
Do
    $gui_msg = GUIGetMsg()
    Select
        Case $gui_msg == 0
            ContinueLoop
        Case $gui_msg == $button_create
            $duplicate_report_name = GUICtrlRead($duplicate_report)
            MsgBox(0,"testing script","Inputted Value: " & $duplicate_report_name)
        Case Else
            ContinueLoop
    EndSelect
Until $gui_msg == $GUI_EVENT_CLOSE
Exit

Share this post


Link to post
Share on other sites

Perfect, Thank you very much.

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  
Followers 0