找回密码
 加入
搜索
查看: 3708|回复: 2

[系统综合] 【已解决】逐渐显示的文字效果有没得办法实现。。。

[复制链接]
发表于 2010-6-13 01:18:25 | 显示全部楼层 |阅读模式
本帖最后由 viplight 于 2010-6-13 12:58 编辑

烦大家帮帮忙,看看下面的代码所出现的效果能不能做的完整而完美!
$titletwo = GUICreate("渐显字测试",280,200,-1,-1)
$guitest = GUICtrlCreateLabel("高手些帮帮忙,"&@CRLF&"我现在这样做出来不能点击“退出” ",15,30,260,40)
$guites1 = GUICtrlCreateLabel("",35,80,260,20)
$cancelbut= GUICtrlCreateButton("退出", 195, 170, 60,25)
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
Func move()
        $s = 100
        While 1
                ControlMove('', '', $guitest, $s - 1, 0)
                $s -= 1
                Sleep(5)
        WEnd
        EndFunc   ;==>move

评分

参与人数 1金钱 +10 收起 理由
afan + 10 感谢主动将修改帖子分类为[已解决],请继续 ...

查看全部评分

发表于 2010-6-13 01:48:39 | 显示全部楼层
$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 相关 - 事件模式

评分

参与人数 1金钱 +20 收起 理由
afan + 20

查看全部评分

 楼主| 发表于 2010-6-13 12:56:53 | 显示全部楼层
回复 2# lynfr8


    非常感谢
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-10-6 12:30 , Processed in 0.086238 second(s), 28 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表