On 25 Jan 2009, at 12:53 PM, Miguel Ortiz Lombardia wrote: > > Le 25 janv. 09 à 12:17, Christiaan Hofman a écrit : > >> >> On 25 Jan 2009, at 12:07 PM, Miguel Ortiz Lombardia wrote: >> >>> >>> Le 25 janv. 09 à 11:50, Christiaan Hofman a écrit : >>> >>>> >>>> On 25 Jan 2009, at 11:14 AM, Miguel Ortiz Lombardia wrote: >>>> >>>>> Thanks, Christian. >>>>> >>>>> It now works as I wanted (that is: cite-key is added and pdf auto- >>>>> filed) provided I set up the properties: >>>>> >>>>> generateCiteKey yes >>>>> autoFileLinkedFile no >>>>> >>>>> If I set the latter one to yes, two publications are created: >>>>> >>>>> - One without cite-key and linked to the pdf, which is not auto- >>>>> filed >>>>> - One with cite-key but not linked to the pdf >>>>> >>>>> I presume this has to do with the fact that I have Auto-File >>>>> activated >>>>> in my BibDesk preferences. >>>>> I don't know if this may create problems for others. As for me, >>>>> the >>>>> script is perfect as it is now. Thanks a lot! >>>>> >>>>> Best, >>>>> >>>>> >>>>> Miguel >>>>> >>>> >>>> No, that's probably a bug somewhere, though I don't know what. Is >>>> there anything in your Console.app? I don't understand why it's >>>> auto- >>>> filing, as you've turned that off. >>>> >>>> I also see that I inverted the "alway" properties, they do >>>> precisely >>>> the opposite of what they're supposed to do. So please re-download >>>> the >>>> script (sorry). >>>> >>>> Christiaan >>>> >>>>> >>> >>> Hi, Christiaan, no problem. >>> >>> In fact... it doesn't work as I said. As you presumed, there is no >>> autofiling either with: >>> >>> generateCiteKey yes >>> autoFileLinkedFile no >>> >>> but it seemed to work once! I can't reproduce it, though. >>> The newest script still behaves the same. I can't see where is the >>> problem in your code... >>> >> >> You mean that there remain two items? That's wrong. And there's >> nothing in the console? Perhaps you can try putting the whole content >> of the "repeat" block in a "try" block, as in >> > > Yes, that's it, both items remain. > There is a message in the console: > > 25/01/09 12:42:53 BibDesk[2700] Error executing script hook "Import > Publications": Il est impossible de rendre yes en type boolean. > > It's in French: It's impossible to rend yes as a boolean type. > > ??? I hope it means something to you... > >> >> repeat with thePub in thePubs >> >> try >> >> ... >> >> on error errorMessage >> >> display dialog errorMessage >> >> end try >> >> end repeat >> >> >> >> Christiaan >>> > > When I do it, the same error is directly reported by BibDesk. > > > Miguel
Amazing! If I already didn't know that AppleScript is the most broken scripting language in the world than here's the proof! If you open the script does yes/no appear in (non-bold) blue? Does it work when you replace yes/no by true/false? And if that doesn't help, can you replace the if-statements for these properties by something like "if generateCiteKey is yes" (or whatever you use)? Christiaan ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Bibdesk-users mailing list Bibdesk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/bibdesk-users