本帖最后由 oemxp 于 2009-11-13 17:49 编辑
论坛一大堆,随便给你个吧
kn007 发表于 2009-11-13 17:23
我怀疑老大根本就没看清我要问的问题,下面四种都不能实现我的问题,但是下面第二种有点用,但是我不想也没精力用第二种代码然后每行文本都加上@crlf&,我之前搜了好久搜不到才问问题的。
---------------------------------------------------------------------------------------
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 304, 173, 192, 124)
$Edit1 = GUICtrlCreateEdit("", 16, 16, 273, 137, $ES_WANTRETURN)
GUICtrlSetData(-1, "Edit1")
GUISetState(@SW_SHOW)
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
---------------------------------------------------------------------------------------
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("示例", 467, 322, 193, 125)
$Edit1 = GUICtrlCreateLabel("", 0, 0, 465, 321)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$TXT="QQ"
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
GUICtrlSetData(-1, $TXT)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
If $nMsg= $GUI_EVENT_CLOSE Then Exit
$mouse=GUIGetCursorInfo()
If $mouse[2] and $mouse[4]=$Edit1 Then
GUICtrlSetCursor ($Edit1, 7)
EndIf
If not $mouse[2] and $mouse[4]=$Edit1 Then
GUICtrlSetCursor ($Edit1, 5)
EndIf
WEnd
---------------------------------------------------------------------------------------
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
Global $Files="说明.txt"
$GUI = GUICreate("", 423, 254, 193, 115)
$Edit = GUICtrlCreateEdit("", 8, 8, 401, 201)
GUICtrlSetData(-1,readdate())
$OK = GUICtrlCreateButton("保存", 8, 216, 75, 25, 0)
GUISetState()
send("{down}")
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
ExitLoop
Case $OK
Setdate()
EndSwitch
WEnd
Func Readdate()
Local $txt,$temp
$temp=FileOpen($Files,0)
$txt=FileRead($temp)
FileClose($temp)
Return $txt
EndFunc ;==>readdate
Func Setdate()
Local $txt,$temp
$temp=FileOpen($Files,2)
$txt=GUICtrlRead($Edit)
FileWrite($temp,$txt)
FileClose($temp)
EndFunc ;==>Setdate[/au3]
-----------------------------------------------------------------------------------------------
#include <GUIConstants.au3>
#include <IE.au3>
$oIE = _IECreateEmbedded ()
GUICreate("Test", 500, 400)
$GUIX = GUICtrlCreateObj($oIE, 0, 0, 500, 400)
GUISetState(@SW_SHOW)
_IENavigate ($oIE, "http://www.91dwg.com/001.htm")
Sleep(6000)
_IENavigate ($oIE, "http://www.91dwg.com/002.htm")
Sleep(6000)
_IENavigate ($oIE, "http://www.91dwg.com/003.htm")
While 1
Sleep(6000)
ExitLoop
WEnd
GUIDelete()
Exit |