On Feb 9, 2010, at 16:32, Christiaan Hofman wrote:

> 
> On Feb 9, 2010, at 15:36, Fischlin Andreas wrote:
> 
>> 
>> On 09/Feb/2010, at 11:53 , Christiaan Hofman wrote:
>> 
>>> You can use AppleScript's conditional expressions, as in:
>>> 
>>> static groups whose publications contain thePub
>> 
>> Many thanks Christiaan. Once again, this did it and all works like a  
>> charm.
>> 
>> One more question: Is there a way to issue menu command "Database ->  
>> Select Duplicates by Cite Key" via AppleScript or do I have to resort  
>> to System Events?
>> 
>> Andreas
> 
> 
> No, but it wouldn't be too hard to write an AppleScript that does exactly the 
> same thing.
> 
> Christiaan
> 

tell document 1 of application "BibDesk"
  set theKeys to {}
  set theDuplicateKeys to {}
  set theDuplicates to {}
  repeat with thePub in publications
    set theKey to cite key of thePub
    ignoring case
      if (theKeys contains theKey and theDuplicateKeys does not contain theKey) 
then
        set theDuplicates to theDuplicates & (get publications whose cite key 
is theKey)
        set end of theDuplicateKeys to theKey
      end if
      set end of theKeys to theKey
    end ignoring
  end repeat
  set selection to theDuplicates
end tell

Christiaan


------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users

Reply via email to