Autohotkey 自动热键:如何移动进度条的位置

Autohotkey 自动热键:如何移动进度条的位置,autohotkey,Autohotkey,我有一个工作进度条,想把它移到屏幕的左上角。我使用x0y0w300来控制位置和大小 但这样做时,我的%progress\u bar\u percentage%停止了更新。我想问,是否可以让位置和进度条%同时工作 a = %counter% b = %CaseArrayCount% progress_bar_percentage := Round(((a/b) * 100), 2) ; Draw the progress bar on the screen Progress, x0 y0 w30

我有一个工作进度条,想把它移到屏幕的左上角。我使用
x0y0w300
来控制位置和大小

但这样做时,我的
%progress\u bar\u percentage%
停止了更新。我想问,是否可以让位置和进度条%同时工作

a = %counter%
b = %CaseArrayCount%
progress_bar_percentage := Round(((a/b) * 100), 2)

; Draw the progress bar on the screen
Progress, x0 y0 w300, %progress_bar_percentage%, %progress_bar_percentage%`%, System Processing , Sample APP

参考资料:

文档实际上说只有在进度窗口不存在的情况下才能使用
选项

如果进度窗口不存在:将创建一个新的进度窗口 创建(替换任何旧的),Param1是一个零或零的字符串 下面列表中的更多选项

这意味着您只能在创建进度条窗口的最开始处设置位置:

Progress, x0 y0, 0`%, System Processing , Sample APP

Loop, 100 {
    Progress, %A_Index%, %A_Index%`%, System Processing , Sample APP
    Sleep, 100
}
如果您尝试在循环中使用选项,您将看到每次迭代都会破坏和新建进度窗口,并且忽略进度值。根据文档
的规定,如果Param1是一个纯数字,则其条的位置将更改为该值
,因此实际上不能同时执行选项和进度值

没有黑客,你能做的最好的事情可能是:

Loop, 10 {
    value := A_Index*10
    Progress, x%value% y%value%, %A_Index%`%, System Processing , Sample APP
    Progress, % value, % value "%", System Processing , Sample APP
    Sleep, 1000
}
你刚刚救了我的命:)+1。非常感谢。