Force the progress window stay in frontmost

I want the progress window to stay in frontmost, during the process (that call other apps to do some things).

Here what I tried. It not work all the time, depending on how my script app has been launched.

tell application "System Events"
    set myname to name of (path to me)
    set extension to name extension of (path to me)
    if length of extension > 0 then
        # Make sure that `text item delimiters` has its default value here.
        set myname to items 1 through -(2 + (length of extension)) of myname as text
    end if
    set frontmost of process myname to true
end tell

I don’t see any progress calls here. Is there more to the script?

Oh yes, sorry. Before that, at the beginning of the script, there is that:

set progress total steps to (TotalAmbiances + 1)
set progress description to "Préparation Ambiances"
set progress additional description to "Initialisation..."
set progress completed steps to 0

And then, along the script, I update the description and completed steps.

:slight_smile: