• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Keywords in Aperture
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Keywords in Aperture


  • Subject: Re: Keywords in Aperture
  • From: Jan Erik Moström <email@hidden>
  • Date: Fri, 1 Aug 2008 23:54:15 +0200

Martin Orpen <email@hidden> 08-08-01 22.13

To get the keywords:

tell application "Aperture"
every keyword of item 1 of (get selection)
end tell


To add a keyword -- or, in this case, a whole hierarchy of keywords:

tell application "Aperture"
set foo to item 1 of (get selection)
tell foo
make new keyword with properties {name:"myKeyword", parents:"AppleScript Code Example"}
end tell
end tell

Thanks that helped. I manage to delete a keyword with this


tell application "Aperture" set curSelection to selection set curItem to item 1 of curSelection delete keyword 1 of curItem end tell

but I have some difficulties in identifying the correct keyword to remove ... or to be more precise get the name of a keyword. If I read the dictionary correctly I should be able to write:

    set kw to item 1 of every keyword of curItem
    get name of kw
    get parent of kw
    get properties of kw

but none of these seem to work. I also looked at 'kw' in Script Debugger and it says "Get failed". So I'm apparently still missing something ...
--
Jan Erik Moström, www.mostrom.pp.se


_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Keywords in Aperture (From: Martin Orpen <email@hidden>)

  • Prev by Date: Re: Keywords in Aperture
  • Next by Date: Re: [HS] translation problem
  • Previous by thread: Re: Keywords in Aperture
  • Next by thread: Checking if a variable is defined
  • Index(es):
    • Date
    • Thread