且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将进度条添加到“执行 shell 脚本"的对话框中在 AppleScript 中

更新时间:2023-12-02 22:27:04

Applescript in MacOS X 10.10 或更高版本具有进度条的内置术语.对于小程序,它在对话框中运行进度指示器.在脚本编辑器中,它显示在状态栏中.调整此术语:

Applescript in MacOS X 10.10 or later has built-in terminology for a progress bar. For applets, it runs a progress indicator in a dialog box. In script editor, it shows in the status bar. Adapt this terminology:

set n to 10

set progress total steps to n
set progress description to "Script Progress"
set progress additional description to "This should be helpful"

repeat with i from 1 to n
    delay 1
    set progress completed steps to i
end repeat