I see now. I really wanted the Add File or URL hook since I automatically get
the bibtex information from DBLP and I simply drop the files that I have on
each individual record. I'll foll around with it.
Thanks again very much.
--
M. Tamer Özsu
University of Waterloo
(Currently on sabbatical leave at ETH Zürich)
On 2011-11-12, at 10:38 PM, Christiaan Hofman wrote:
> No, the script hook is activated when you import a new publication, e.g. by
> dropping a PDF on the main table.
>
> If you want it to be activated when adding a linked file to an existing item,
> you should use it as a script hook for "Add File or URL". You should also
> change the script a bit.
>
> Christiaan
>
> On Nov 12, 2011, at 21:58, M. Tamer Özsu wrote:
>
>> Christiaan,
>>
>> I am assuming the Import Publications action is activated when I drop a PDF
>> file onto a record. The reason I am asking for confirmation is because I was
>> not able to get the hook to work. Just to be certain, here is what I did:
>>
>> - I opened the script in Script Editor and saved it in ~/Library/Application
>> Support/Bibdesk/Scripts folder
>> - I attached it to "Import Publications" in the Bibdesk preferences
>> - I am now dropping the pdf files onto the right hand-side panel when I
>> select a record from the database
>>
>> I hope I am on the right track.
>>
>> --
>> M. Tamer Özsu
>> University of Waterloo
>>
>> (Currently on sabbatical leave at ETH Zürich)
>>
>> On 2011-11-12, at 7:52 PM, Christiaan Hofman wrote:
>>>
>>> This is not a script hook, only AppleScript can be used for script hooks.
>>>
>>> Here is an AppleScript that you can use as an "Import Publication" script
>>> hook:
>>>
>>> using terms from application "BibDesk"
>>> on perform BibDesk action with publications thePubs for script hook
>>> theScriptHook
>>> if name of theScriptHook is not "Import Publications" then
>>> return
>>> repeat with thePub in thePubs
>>> tell thePub
>>> set numFiles to count of linked files
>>> if numFiles > 0 and value of field "Keywords" ≠
>>> "" then
>>> set theTags to {}
>>> repeat with i from 1 to numFiles
>>> set theTags to theTags & (get
>>> tags of linked file i)
>>> end repeat
>>> if (count of theTags) > 0 then
>>> set AppleScript's text item
>>> delimiters to ", "
>>> set value of field "Keywords"
>>> to (theTags as text)
>>> end if
>>> end if
>>> end tell
>>> end repeat
>>> end perform BibDesk action with publications
>>> end using terms from
>>>
>>> Christiaan
>>>
>>
>> ------------------------------------------------------------------------------
>> RSA(R) Conference 2012
>> Save $700 by Nov 18
>> Register now
>> http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________
>> Bibdesk-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/bibdesk-users
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________
> Bibdesk-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/bibdesk-users
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users