Progress Bar - cannot get it to display above all other windows

Firstly, many thanks for all your help and advice.

My dilemma is:
When trying to use the progress bar within indesign, I have to call a function to populate the
“progress additional description” & “progress completed steps”.
This is because I can’t use them within Indesign as I get an error and no display…also the same with Image Events!
Instead, I have to call a function that updates and displays progress. This works but is hidden behind Indesign and other windows!
Any ideas?

Not sure if I am right here, but:
Use an applet, activate it before calling the progress display / update code, possibly in a “tell me” block?
Or use a tell block directed to the frontmost app in your script.
I guess this may very much depend on which OS version you are using.

Try this way:

tell application "Image Events"
   repeat with x from 1 to 10
      set my progress total steps to 10
      set my progress completed steps to x
      set my progress description to "Testing"
      set my progress additional description to x
      delay 1
      
   end repeat
   
end tell

Many thanks for your comments.
In this example, Indesign hides the progress bar under the open document window its processing…

Currently running MacOS Sonoma v14.3.1

set ImageNameList to {}
set pageRefList to {}
set linkRefList to {}


my getLinkInfo(ImageNameList, pageRefList, linkRefList)

on getLinkInfo(ImageNameList, pageRefList, linkRefList)
	set rpt to 1
	try
		tell application "Adobe InDesign 2023"
			activate
			tell active document
				repeat with pageNo from 1 to (count of pages)
					set myrectangles to all graphics of page pageNo
					repeat with pageitem from 1 to (count of myrectangles)
						set ImageName to get name of item link of (item pageitem of myrectangles) as string --- gets the Image name from (pageitem) on page (pageNo)
						set pageRef to name of parent page of parent of link ImageName --- gets the Image page number of 'ImageName'
						set linkRef to file path of link ImageName --- gets the Link Reference Path of 'ImageName'
						
						copy ImageName to end of ImageNameList --- create list of image names
						copy pageRef to end of pageRefList --- create list of page numbers
						copy linkRef to end of linkRefList --- create list of link references
						
					end repeat
					
					set my progress total steps to (count of pages)
					set my progress completed steps to pageNo
					set my progress description to "Processing images"
					set my progress additional description to pageNo
					delay 1
				end repeat
			end tell
		end tell
	on error e
		my errorHandlerCancel(e)
	end try
end getLinkInfo

I have a simple timer that had this issue. I added the following line after the ‘set progress completed steps…’ repeat loop (immediately after the end repeat line).

tell application "SystemUIServer" to activate

Apparently SystemUIServer manages the progress bar. I think I learned this from @KniazidisR but I cannot locate the thread.