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