本帖最后由 papapa314 于 2011-5-23 16:36 编辑
回复 1# 木头人
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Opt("GUIOnEventMode", 1)
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 377, 299, 192, 124)
$Edit1 = GUICtrlCreateEdit("", 64, 32, 241, 177)
$Button1 = GUICtrlCreateButton("Button1", 112, 240, 115, 33)
GUISetOnEvent($GUI_Event_CLose,"quit")
GUICtrlSetOnEvent($Button1,"write")
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
Sleep(100)
WEnd
Func quit()
Exit
EndFunc
Func write()
FileWrite("写入的文本.txt",GUICtrlRead($Edit1))
MsgBox(0,"","写入成功",3)
EndFunc
|