I am scripting iphoto and would like to know when it is done saving
its contents to the library
I know on can do this sort of thing
tell app "System events"
if(process "iphoto") exists
-- more stuff here
end tell
to tell if an app is running.
can you also use "system events" to see if an app is busy ( or still
busy) saving to disk?
There is no such thing as asking an app whether it's busy saving to
disk. What I would do is: check whether iPhoto is responsive or not
while it's saving. If it's not you can perform repetitively a line
such as:
try
with timeout of 1 seconds
tell app "iPhoto" to get 1+1
end timeout
-- iPhoto is responsive
on error
-- iPhoto is not responsive, maybe busy?
end