Apple’s Backup app is not scriptable. How can I check if it is actually doing a Backup ? Not testing if the app is activated, but if the app is actually backuping to iDisk ?
I have a script that put my computer to sleep under certain condition and this is one of them.
Your script works with Backup. Why does it don’t work when applied to an application belonging to ROOT ?? Even when Retrospect is executing the script does not return the process percentage. Retrospect belongs to ROOT.
Then if «Activity Monitor» can display Retrospect’s activity (even if it belongs to ROOT), is that information available to query with a shell script ?
on idle
if getProcessPercentCPU("Backup") > 1 then
say "Running"
else
say "Inactive"
end if
return 5
end idle
on getProcessPercentCPU(someProcess)
do shell script "/bin/ps -xco %cpu,command | /usr/bin/awk '/" & someProcess & "$/ {print $1}'"
end getProcessPercentCPU
When I copy and paste it in a more complex «on idle» routine, I get this Script Editor message:
You probably call a handler within an application tell block.
Either move the line with the call outside the tell block or use the keyword my before the handler’s name
to force AppleScript itself to perform the call
Thank you for your help. You are more precious than a gem.
In case you did not see this post … If «Activity Monitor» can display Retrospect’s activity (even if it belongs to ROOT), is that information available to query with a shell script ?