小弟在论坛找了个源码,也许有用,偶去吃饭先。
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
$Form1 = GUICreate("Form1", 223, 249, 445, 117)
$LabelPrefix = GUICtrlCreateLabel("电脑名称前缀", 24, 64, 76, 17, BitOR($SS_CENTER, $SS_CENTERIMAGE))
$Labelbjxh = GUICtrlCreateLabel("本机序号", 24, 96, 50, 17, BitOR($SS_CENTER, $SS_CENTERIMAGE))
$Labelbjmc = GUICtrlCreateLabel("本机名称", 24, 32, 48, 20, $SS_CENTERIMAGE)
$InputPrefix = GUICtrlCreateInput("电脑", 104, 64, 100, 21)
$Inputbjxh = GUICtrlCreateInput("01", 104, 96, 100, 21)
Local $dnmc1,$dnmc2,$dnmc3
$dnmc1=GUICtrlRead ( $InputPrefix )
$dnmc2=GUICtrlRead ( $Inputbjxh )
$Inputbjmc = GUICtrlCreateInput($dnmc1&$dnmc2, 104, 32, 100, 21)
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
$dnmc1=GUICtrlRead ( $InputPrefix )
$dnmc2=GUICtrlRead ( $Inputbjxh )
$dnmc3=GUICtrlRead ( $Inputbjmc )
If $dnmc3 <> $dnmc1&$dnmc2 Then GUICtrlSetData ( $Inputbjmc , $dnmc1&$dnmc2 )
WEnd
|