Applescript, Clipboard, Libraries and Stand-alones
Mark Schonewille
m.schonewille at economy-x-talk.com
Tue May 6 13:42:23 EDT 2008
Tom,
Did you see my last reply regarding your problem concerning PNGs?
I don't know where you got the instruction to activate an application
before setting the clipboard, but this seems like nonsense to me. The
clipboard usually works at system level. It shouldn't be necessary to
do this inside a tell block.
Can't you just have AppleScript return the data to Revolution and use
a Rev script to read the picture from the result, like you did earlier?
Best,
Mark
--
Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Get your store on-line within minutes with Salery Web Store software.
Download at http://www.salery.biz
Op 6-mei-2008, om 18:54 heeft Thomas McGrath III het volgende
geschreven:
> I need to find out the answer to this one!
>
> I am using an Applescript from within Revolution that sets the
> clipboard to an image that the Applescript fetches.
> The script looks like the one below, where <name> , <playlist> and
> <application> are replaced from the Revolution side. The name and
> playlist are the names of the track and playlist and the
> application is (I assume) the one that is calling the
> applescript??? But the command and paste are sent from one stack to
> another (the other is a library stack).
>
> The entry for the clipboard states: set the clipboard to
> v : Place data on an application’s clipboard. Use inside a ‘tell’
> block and activate the application first
>
>
> try
> tell application "iTunes"
> set myTrackKind to the kind of artwork 1 of track "<name>" of
> playlist "<playlist>"
> if myTrackKind is 0 then
> set myTrack to the (data of artwork 1 of track "<name>" of
> playlist "<playlist>") as picture
> end if
> end tell
> tell application "<application>"
> activate
> set the clipboard to myTrack as picture
> end tell
> end try
>
> The problem is that when a stack or substack is set as the
> "<application>" the script does not work. When Revoution is set as
> the "<application>" it still does not work. The AS entry states
> that the applications clipboard needs to be active first but I have
> tried the Library, the Stack and Revolution (From within the IDE)
> and no luck......
>
>
> Any ideas here???
>
> Tom McGrath
>
More information about the use-livecode
mailing list