Progress Display while dialog is displayed

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

You might take a look at Stefan Klieme’s faceless background app “SKProgressBar”. I believe it can handle your needs. It has a thorough AppleScript dictionary and comes with a sample script that shows off many of its capabilities. It runs in the background and will show/update/remove progress windows as you direct.

Your Mac will complain about the .dmg’s safety, but you can give permission in Privacy & Security settings and open it anyway. The app on the .dmg has no file extension, so add “.app” and it will work. You can download it here: https://www.klieme.com/Downloads/SKProgressBar/SKProgressBar2.0.zip