找回密码
 加入
搜索
查看: 2944|回复: 6

[图形处理] 求仿做QQ初始化或进度显示进度条

  [复制链接]
发表于 2011-4-11 18:33:45 | 显示全部楼层 |阅读模式


如上图所示,这个初始化图很好看
AU3如何仿做QQ初始化或进度显示进度条

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?加入

×
发表于 2011-4-11 18:38:18 | 显示全部楼层
就弄个gif图片不就行了
发表于 2011-4-11 19:20:42 | 显示全部楼层
发表于 2011-4-12 15:52:48 | 显示全部楼层
回复 3# ceoguang


此帖看过,效果还过得去,但还不够精细
发表于 2011-4-12 15:53:51 | 显示全部楼层
希望哪位大大能完善一下,那就更好
发表于 2011-4-12 21:20:20 | 显示全部楼层
LZ那压根就不是什么进度条  ......

它就像GIF一样的 是不受你控制的
发表于 2011-4-13 00:57:00 | 显示全部楼层
#NoTrayIcon
Opt("GUIResizeMode", 802)
Opt("GUIDataSeparatorChar", ChrW('0x00A4'))
Global $Color = 0x00ccff, $BkColor = 0xf7f7f7

$Lng1 = 'Used symbol :'
$LngSt = 'Start'
$LngSz = 'Size :'
$LngDl = 'Delay :'
$LngSty = 'Style :'
$LngSel = 'Choose'
$LngAdd = 'Add'



$hForm = GUICreate("Progress Bar", 380, 160 + 30, -1, -1, 0x00040000)
$hButton1 = GUICtrlCreateButton($LngSt, 260, 115, 80, 30)
GUICtrlCreateLabel($Lng1, 10, 43, 130, 17)
$symbol = GUICtrlCreateCombo('', 140, 40, 60)
GUICtrlSetData(-1, ' ' & ChrW('0x2588') & '¤|¤/¤\¤*¤(¤)¤' & ChrW('0x25CF') & '¤' & ChrW('0x25AA') & '¤' & ChrW('0x2022') & '¤' & ChrW('0x2039') & '¤' & ChrW('0x203A') & '¤' & ChrW('0x2206') & '¤' & ChrW('0x20AC') & '¤!¤.', ' ' & ChrW('0x2588'))
GUICtrlCreateLabel($LngSz, 10, 73, 130, 17)
$kol_sim = GUICtrlCreateCombo('', 140, 70, 60)
GUICtrlSetData(-1, '20¤30¤50¤100¤120¤200', '20')
GUICtrlCreateLabel($LngDl, 10, 103, 130, 17)
$Delay = GUICtrlCreateCombo('', 140, 100, 60)
GUICtrlSetData(-1, '10¤20¤50¤100¤200', '20')
GUICtrlCreateLabel($LngSty, 10, 133, 130, 17)
$Style = GUICtrlCreateCombo('', 140, 130, 60)
GUICtrlSetData(-1, '1¤2¤3¤4¤5', '1')

GUICtrlCreateGroup('', 205, 28, 160, 72)
$hSelect = GUICtrlCreateButton($LngSel, 210, 40, 60, 25)
$hAdd = GUICtrlCreateButton($LngAdd, 210, 70, 60, 25)
$Un = GUICtrlCreateCombo('', 280, 40, 60)
GUICtrlSetData(-1, '2588¤25A0¤F031¤25B2¤25BA¤25BC¤2590¤2666¤25D8¤263B', '2588')

GUISetState()

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case -3
                        Exit

                Case $hButton1
                        $symbol0 = GUICtrlRead($symbol)
                        $Delay0 = GUICtrlRead($Delay)
                        $kol_sim0 = GUICtrlRead($kol_sim)
                        $aStartTPB = _TPB_ProgressOn(10, 5, $kol_sim0, 21, $symbol0)
                        For $i = 0 To 100
                                Sleep($Delay0)
                                _TPB_ProgressSet($aStartTPB, $i)
                                ; GUICtrlSetData($hButton1, $i & " %")
                        Next
                        ; GUICtrlDelete($aStartTPB[0])
                        ; _TPB_ProgressClose($aStartTPB)

                Case $hSelect
                        Run('charmap.exe')

                Case $hAdd, $Un
                        $Un0 = ChrW('0x' & GUICtrlRead($Un))
                        GUICtrlSetData($symbol, $Un0, $Un0)

                Case $Style
                        Switch GUICtrlRead($Style)
                                Case 1
                                        $Color = 0x00CCFF
                                        $BkColor = 0xF7F7F7
                                Case 2
                                        $Color = 0xFF8700
                                        $BkColor = 0xFFFF8D
                                Case 3
                                        $Color = 0xFF0361
                                        $BkColor = 0xFFDEDA
                                Case 4
                                        $Color = 0x00A272
                                        $BkColor = 0xE8EED8
                                Case 5
                                        $Color = 0x515151
                                        $BkColor = 0xF1F1F1
                                Case Else
                                        $Color = 0x00CCFF
                                        $BkColor = 0xF7F7F7
                        EndSwitch

        EndSwitch
WEnd

Func _TPB_ProgressOn($left, $top, $amount, $height, $symbol)
        If IsDeclared('aStartTPB') And IsArray($aStartTPB) Then GUICtrlDelete($aStartTPB[0]) ; Delete
        Local $aStartTPB[3], $String = '  '
        For $i = 1 To $amount
                $String &= $symbol
        Next
        GUISetFont(12, 700)
        $aStartTPB[0] = GUICtrlCreateLabel($String, $left, $top, -1, $height)
        GUICtrlSetData(-1, '')
        GUICtrlSetColor(-1, $Color)
        GUICtrlSetBkColor(-1, $BkColor)
        ; GUICtrlSetColor(-1, 0xff8700)
        ; GUICtrlSetBkColor(-1, 0xffff8d)
        $aStartTPB[1] = $amount
        $aStartTPB[2] = $symbol
        Return $aStartTPB
EndFunc   ;==>_TPB_ProgressOn

Func _TPB_ProgressSet($aStartTPB, $Prosent = 0)
        If $Prosent < 0 Or $Prosent > 100 Then Return SetError(1, 0, 0)
        Local $kol = Int($Prosent * ($aStartTPB[1] / 100)), $String = '  '
        For $i = 1 To $kol
                $String &= $aStartTPB[2]
        Next
        If GUICtrlRead($aStartTPB[0]) = $String Then Return
        GUICtrlSetData($aStartTPB[0], $String)
EndFunc   ;==>_TPB_ProgressSet

; Func _TPB_ProgressClose($aStartTPB)
; GUICtrlDelete($aStartTPB[0])
; EndFunc
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-5-14 13:16 , Processed in 0.082765 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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