|
#1
| |||
| |||
| AppleScript cocoa app freezes when running shell script Hello, I'm trying to make an AppleScript based cocoa application with Xcode, which runs shell scripts. The problem is, I have a progress bar which is meant to run while performing the shell script, but the whole app freezes while the script runs, and then unfreezes when the script is done executing. Here is a code snippet: Code: on clicked theObject
if title of theObject is "Start" then
do shell script "cp -r ~/Sites ~/Desktop/Sites"
start progress indicator "bar" of window "Main"
set title of theObject to "Stop"
else if title of theObject is "Stop" then
set title of theObject to "Start"
stop progress indicator "bar" of window "Main"
end if
end clicked ![]() |