I have implemented a progress bar and text field in my app copying Progress indicator not showing up immediately. Please look at the code below.
tell progress indicator "BarberPole" of window "ImgFuserWindow"
-- This makes the application use a separate thread to handle the animation
set uses threaded animation to true
set indeterminate to true
set visible to true
start
end tell
set content of text field "ProgressText" of window "ImgFuserWindow" to "Some text"
set visible of text field "ProgressText" of window "ImgFuserWindow" to true
set AISTool to quoted form of ((resource path of main bundle) & "/align_image_stack")
do shell script AISTool & " -a fused " & " " & ImageList
stop progress indicator "BarberPole" of window "ImgFuserWindow"
set visible of progress indicator "BarberPole" of window "ImgFuserWindow" to false
set visible of text field "ProgressText" of window "ImgFuserWindow" to false
ImgFuserWindow is my main window. I reserved a “corner” of the window, with the hidden text field and the bar, to display progress when necessary.
Maybe I could use a popup progress window, but I prefer to do it like this.
However, both the progress bar and text are not shown onto the screen. At the end of the shell run the text field and bar it sometimes appear to immediately disappear again due to the visible=> false setting.
Can someone please tell me what I do wrong?