Jump to content

Recommended Posts

Posted

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.

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

qq

Posted

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

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
  • Recently Browsing   0 members

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