Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Can I and How: create iphoto smart albums from keywords?

is it possible to auto-create smart albums from all my keywords?

I know how to do it manually, but, as I have many keywords, I would like it done en masse.

iMac, Mac OS X (10.5.5)

Posted on Jan 5, 2011 2:02 PM

Reply
2 replies

Jan 5, 2011 4:46 PM in response to Marion T

If you don't mind using [GUI Scripting|http://www.macosxautomation.com/applescript/uiscripting/index.html], maybe you might like to try the following script. However, you must first enable the Accessibility Frameworks by clicking the checkbox labeled "Enable access for assistive devices" in the Universal Access System Preference pane.

*tell application "iPhoto"*
* set allTheKeywords to {}*
* repeat with thisPhoto in photos*
* repeat with thisKeyword in keywords of thisPhoto*
* if name of thisKeyword is not in allTheKeywords then*
* copy name of thisKeyword to the end of allTheKeywords*
* end if*
* end repeat*
* end repeat*
activate
* repeat with thisKeyword in allTheKeywords*
* if not (album thisKeyword exists) then*
* tell application "System Events" to tell process "iPhoto"*
* keystroke "n" using {option down, command down}* -- New Smart Album…
* keystroke thisKeyword* -- Smart Album name
* tell group 1 of sheet 1 of window 1*
* click pop up button 1*
* keystroke "Keyword" & return*
* click pop up button 1 of group 2*
* keystroke "is" & return*
* click pop up button 1 of group 1*
* keystroke thisKeyword & return*
* keystroke return* -- OK
* end tell*
* end tell*
* end if*
* end repeat*
*end tell*


The above script seems to work flawlessly with a few keywords. I can't say if it will work properly with many keywords.

Hope it can help.

Message was edited by: Pierre L.

Can I and How: create iphoto smart albums from keywords?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.