ってことは、こんな感じか?
tell application "iPhoto"
set i to 0
set small to 0
set m to count of photo
repeat while i < m
if width of photo i < 400 then
remove photo i from album 0
set m to count of photo
set small to small + 1
set i to i - 1
if small mod 100 = 0 then
say small
say "is removed"
empty trash
end if
end if
set i to i + 1
if i mod 100 = 0 then
say i
end if
end repeat
empty trash
small
end tell
こんなダサイループじゃなくて、
repeat with aPhoto in every photo whose width < 400
remove aPhoto from album 0
end repeat
とかっこ良く書きたいんですけど。
No comments:
Post a Comment