You are here

3 posts / 0 new
Last post
How to Speed up 'whose' filtering? #1
Junya ENOKI's picture
by Junya ENOKI
October 8, 2010 - 11:35am

Hi All,
I 'm writing Applescript to stat un-rated images ratio by projects/albums
for Numbers sheet.
But It painly slow at smart album that have approx. 10000 images.

set allAlbums to every album
repeat with i from 1 to count of allAlbums
tell (item i of allAlbums)
set count1star to (count of every image version where main rating >=1)
set count0star to (count of every image version where main rating >=0)
end tell
-- setting values to "Numbers.app" --
end repeat

Is there any way to speeding up with this?
I consider to set smart album rating filter,but that is not documented.

Morten Scheel's picture
by Morten Scheel
October 11, 2010 - 12:26am

I’m not sure. I can’t get your script to run (wrapped in tell aperture and tell library 1). I’m a beginner at AppleScript, so the only way I know how to do it, is to set up another repeat loop inside the first, flipping through all versions of the current album and increasing count1star by 1 if main rating >=1. That might of course make the script slower, but like I said I don’t know any faster ways and I can’t get yours to work.

Do you have any experience with the add chart command in Keynote? I can’t get it to accept only one data set.

Morten
@aFringeDweller

Morten Scheel's picture
by Morten Scheel
October 11, 2010 - 12:59am

I added a few parentheses and changed the word where to whose, and now it works.
set count1star to (count (every image version whose main rating ≥ 1))
Was this what you meant?

You may login with either your assigned username or your e-mail address.
Passwords are case-sensitive - Forgot your password?