I have a situation where my app sends a script to the terminal and i have a custom modal panel open so that the user can’t do anything to the app while the process is running in the terminal…i have a loop set up to determine when the terminal process has ended, and at that point i want to have the panel automatically close letting the user know that it’s ok to do something else. here’s what my code looks like…
on showStatus()
if statusPanel is equal to missing value then
set statusPanel to window "statusWindow"
set indeterminate of progress indicator "progressBar" of window "statusWindow" to true
tell progress indicator "progressBar" of window "statusWindow" to start
end if
display statusPanel
set n to 0
delay 1
repeat until n > 0
set x to do shell script "ps cax | awk '/extract-xiso/{print $5}'"
if not x = "extract-xiso" then
set n to 1
end if
end repeat
close panel statusPanel
end showStatus
the problem I’m having is, the panel won’t close! how do i get the panel to automatically close on its own at the end of that function? thanks in advance!
nope didn’t work…panel still stays open! stubborn thing!
it works just fine if i display the panel attached to the main window…but once i display it as a modal panel…it doesn’t close.