I’m experimenting with AS at the moment and wondering why the command
(from the standards additions dictionary)
set the clipboard to graphic object n of document 1
and the event log has {{reference, 152}} for the command ‘clipboard info’,
which leaves no graphic object in the clipboard)
but when I substitute ‘set the clipboard …’ with
copy to clipboard (the clipboard graphic object n of document 1)
(which is something I chanced upon and is not written anywhere I can see)
and the event log has {{picture, 338}} for the command ‘clipboard info’,
which does leave the correct graphic object in the clipboard.
Any help would be appreciated.
Model: 15" PowerBook G4
AppleScript: v2.0
Browser: Safari 1.3.1
Operating System: Mac OS X (10.3.9)
One possible reason why nobody’s responded yet to your question might be that, out of context, it’s a little tricky to place. However, my guess is that your snippets were extracted from an AppleWorks 6 application tell statement.
If this is the case, then your earlier script would be setting the clipboard to a reference, such as: graphic object n ofdrawing areaofdocument “whatever” ofapplication “AppleWorks 6”. Unfortunately, that’s not something the clipboard really knows how to interpret too well - so we need a way to dereference it to a form that the clipboard can handle. Fortunately, AppleWorks provides a built-in method for doing just that. It’s the command you stumbled upon, copy to clipboard - from the AppleWorks Suite of the AppleWorks AS dictionary.