ProgressOn

首页  后退  前进

ProgressOn
down2

ProgressOn

创建自定义进度条窗口.

 

ProgressOn ( "title", "maintext" [, "subtext" [, x pos [, y pos [, opt]]]] )

参数

title

进度条窗口的标题.

maintext

进度条上方的文字, 文字加粗.

subtext

[可选] 进度条下方的文字, 正常字体(默认留空)

x pos

[可选] 进度窗口左侧位置(象素). 默认居中显示)

y pos

[可选] 进度窗口上方位置(象素). 默认居中显示)

opt

[可选] 默认置顶并带标题

可以添加以下选项:

 $DLG_NOTITLE (1) = 细边框, 较小的窗口标题

 $DLG_NOTONTOP (2) = 取消置顶属性

 $DLG_MOVEABLE (16) = 窗口可移动

 

常量定义在 AutoItConstants.au3

返回值

None.

备注

如果要跳过可选参数, 使用它的默认值:

 字符串类型参数, 设置为 ""

 数字类型参数, 设置为 -1

如果本函数调用时已存在一个进度窗口, 则该窗口将被刷新或移动.

(要同时显示多个进度窗口, 需要使用多个脚本.)

 

 

函数示例

Example()
Func Example()
    ; Display a progress bar window.
    ProgressOn("Progress Meter", "Increments every second", "0%")
    ; Update the progress value of the progress bar window every second.
    For $i = 10 To 100 Step 10
        Sleep(1000)
        ProgressSet($i, $i & "%")
    Next
    ; Set the "subtext" and "maintext" of the progress bar window.
    ProgressSet(100, "Done", "Complete")
    Sleep(5000)
    ; Close the progress window.
    ProgressOff()
EndFunc   ;==>Example

----------------------------------------

该函数可以通过命令调用 exect

参见:

ProgressOff, ProgressSet

例子
copy

exect=ProgressOn('Измеритель','Увеличивается','0~~процентов') <FOR> 1 <TO> 5 exect=ProgressSet(:INDEX:*20,:INDEX:*20&'~~процентов')&Sleep(1000) <NEXT> exect=ProgressOff() ;; 示例栏进度

up2

tcimage © Аверин Андрей для Total Commander Image Averin-And@yandex.ru