我现在只有像下面这样才能读取GUICtrlCreateInput中的值,
如果我写成$url = GUICtrlRead(GUICtrlCreateInput("", 112, 16, 121, 21)),msgbox中直接显示$url,那就会显示为空
如果我重新定义一个变量$xxx=GUICtrlRead($url),在msgbox中显示新变量,同样为空,为什么啊?#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Documents and Settings\Administrator.NOP\桌面\Form1.kxf
$Form1 = GUICreate("0000", 248, 196, 369, 201)
$url = GUICtrlCreateInput("", 112, 16, 121, 21)
$Button1 = GUICtrlCreateButton("确定", 32, 136, 75, 25)
$Button2 = GUICtrlCreateButton("取消", 136, 136, 75, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button2
Exit
Case $Button1
MsgBox(0,"",GUICtrlRead($url))
GUIDelete($Form1)
GUISetState(@sw_hide,$Form1)
EndSwitch
WEnd
|