$guitest = GUICtrlCreateLabel("高手些帮帮忙,"&@CRLF&"我现在这样做出来不能点击“退出” ",15,30,260,40) #include <GUIConstantsEx.au3>
Opt("GUIOnEventMode", 1)
$titletwo = GUICreate("渐显字测试", 280, 200, -1, -1)
GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSE")
$guitest = GUICtrlCreateLabel("高手些帮帮忙," & @CRLF & "我现在这样做出来不能点击“退出” ", 15, 30, 260, 40)
$guites1 = GUICtrlCreateLabel("", 35, 80, 260, 20)
$cancelbut = GUICtrlCreateButton("退出", 195, 170, 60, 25)
GUICtrlSetOnEvent($cancelbut, "CLOSE")
GUISetState()
_test($guites1, "我想要的是这样的效果")
move()
While 1
$s = 100
$msg = GUIGetMsg()
Select
Case $msg = $cancelbut Or $msg = $cancelbut
Exit
EndSelect
WEnd
Func _test($oem1, $date)
$sspt = StringSplit($date, "")
For $i = 1 To $sspt[0]
If $i = 1 Then
GUICtrlSetData($oem1, $sspt[1])
ElseIf $i = 2 Then
GUICtrlSetData($oem1, $sspt[1] & $sspt[2])
ElseIf $i = 3 Then
GUICtrlSetData($oem1, $sspt[1] & $sspt[2] & $sspt[3])
ElseIf $i = 4 Then
GUICtrlSetData($oem1, $sspt[1] & $sspt[2] & $sspt[3] & $sspt[4])
ElseIf $i = 5 Then
GUICtrlSetData($oem1, $sspt[1] & $sspt[2] & $sspt[3] & $sspt[4] & $sspt[5])
ElseIf $i = 6 Then
GUICtrlSetData($oem1, $sspt[1] & $sspt[2] & $sspt[3] & $sspt[4] & $sspt[5] & $sspt[6])
ElseIf $i = 7 Then
GUICtrlSetData($oem1, $sspt[1] & $sspt[2] & $sspt[3] & $sspt[4] & $sspt[5] & $sspt[6] & $sspt[7])
ElseIf $i = 8 Then
GUICtrlSetData($oem1, $sspt[1] & $sspt[2] & $sspt[3] & $sspt[4] & $sspt[5] & $sspt[6] & $sspt[7] & $sspt[8])
ElseIf $i = 9 Then
GUICtrlSetData($oem1, $sspt[1] & $sspt[2] & $sspt[3] & $sspt[4] & $sspt[5] & $sspt[6] & $sspt[7] & $sspt[8] & $sspt[9])
ElseIf $i = 10 Then
GUICtrlSetData($oem1, $sspt[1] & $sspt[2] & $sspt[3] & $sspt[4] & $sspt[5] & $sspt[6] & $sspt[7] & $sspt[8] & $sspt[9] & $sspt[10])
EndIf
Sleep(500)
Next
EndFunc ;==>_test
Func move()
$s = 100
While 1
ControlMove('', '', $guitest, $s - 1, 0)
$s -= 1
Sleep(5)
WEnd
EndFunc ;==>move
Func CLOSE()
Exit
EndFunc ;==>CLOSE
帮助文件-GUI 相关 - 事件模式 |