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