I’m hoping this is possible.
I have an appleScript that displays dialogs (including Dialog Toolkit) that use the giving up parameter. While the dialog is displayed I’d like to have appleScript progress displayed, with the progress completing when the giving up time is finished.
The idea being the user would see the progress while the dialog is up telling the user when the dialog is clear.
I’ve tried with a script object (below) and it didn’t work. The script waits for the script object to finishish before it goes to the next command.
Is there any way to do this, basically ignoring responses from the script object so it runs concurrently with the script?
use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions
script PauseProgress
on PauseDisplay(totalSteps, givingUpTime, progDesc, progAddDesc)
delay 0.5
repeat with x from 1 to totalSteps
set my progress total steps to totalSteps
set my progress completed steps to x
set my progress description to progDesc
set my progress additional description to progAddDesc
delay 1
end repeat
end PauseDisplay
end script
set delayTime to 5
set totalSteps to 5
set progDesc to "Pausing for " & delayTime & " seconds"
set progAddDesc to "Penalty Shootout Simulator"
ignoring application responses
tell PauseProgress
its PauseDisplay(totalSteps, delayTime, progDesc, progAddDesc)
end tell
end ignoring
--display alert
set buttonList to {("Cancel"), ("Copy"), ("Okay")}
set resultAlertreply to display alert ("alertText") ¬
message ("messageText") ¬
as critical ¬
buttons buttonList ¬
default button (3) ¬
giving up after delayTime