Apple Script Help

jared_f
Valued Contributor

Hi, we are trying to add a status bar to one of our dialogs that pops up at login.

We use this for the status bar:

set n to 10

set progress total steps to n

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

end repeat

We use this for the text:

display dialog "..."

Unfortunately, we cannot seem to merge these two without breaking the status bar. Has anybody ever had success with this?

Thanks in advance,
Jared

1 ACCEPTED SOLUTION

talkingmoose
Moderator
Moderator

Try this:

set n to 10

set progress total steps to n

repeat with i from 1 to n
    set progress additional description to "..."
    delay 1
    set progress completed steps to i
end repeat

You'll find some good documentation on Apple's Developer site. FYI, the status bar only appears for scripts saved as apps and then opened by double-clicking or using a File > Open command.

View solution in original post

2 REPLIES 2

talkingmoose
Moderator
Moderator

Try this:

set n to 10

set progress total steps to n

repeat with i from 1 to n
    set progress additional description to "..."
    delay 1
    set progress completed steps to i
end repeat

You'll find some good documentation on Apple's Developer site. FYI, the status bar only appears for scripts saved as apps and then opened by double-clicking or using a File > Open command.

jared_f
Valued Contributor

@talkingmoose Thank you, exactly what I need.