On Jul 28, 2009, at 10:00 PM, Maxwell, Adam R wrote:
> On 07/28/09 12:40, "Andreas Fischlin" <[email protected]>
> wrote:
>
>> I believe I considered these things already, but to cut a long
>> story even
>> shorter ( ;-) ), can you write an AppleScript statement with
>> BibDesk's command
>> 'export' that works? I know of none, regardlesss of file
>> specifications and
>> came to the conclusion the command is defunct (BibDesk bug?).
>>
>> Thanks, should you know of one and send me one. One example would
>> already make
>> me quite happy. ;-)
>
> The automatic RSS export script on the wiki does this, doesn't it?
>
> tell theDoc
> export using template theTemplateName to theFile
> end tell
>
Yes, as I said, look at the sample scripts. The export command just
works. There's no BibDesk bug, your conclusion is wrong. If it does
not work for you, you're just doing it wrong.
Again, what you need to learn is how to create file references, and in
that respect AppleScript (not BibDesk) is rather messy and buggy. So I
advice you to first play around with file references first in some
test scripts to see what works, how they work, and what does not work
(no need to use BibDesk). You will find that this won't work:
set theFile to file "disk:path:to:a:file"
while this works for an exisiting file:
set theFile to alias "disk:path:to:file"
and these works for any file (need not exist), but only outside a tell
block:
set theFile to file specification "disk:path:to:a:file"
set theFile to POSIX file "/path/to/a/file"
Again, my recommendation is the last form. If you want to use the last
two forms inside a tell block you should prepend by the keyword "my".
You can also get a file object using the "choose file" command.
Anyway: any of this has nothing to do with BibDesk, it's built-in
AppleScript support.
Christiaan
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Bibdesk-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bibdesk-users