Re: Writing multiple files to clipboard
Re: Writing multiple files to clipboard
- Subject: Re: Writing multiple files to clipboard
- From: Robert Krüger <email@hidden>
- Date: Sun, 12 Dec 2010 10:48:55 +0100
Hi,
thanks for the quick reply but it did not work that way either. I didn't get a "Paste items" menu entry.
However, when I added "as «class furl»" I got "paste item" (still not correct, should be "items") but then the paste command failed with an error saying that one or more of the items no longer existed.
Weird, this must be doable in a simple way.
Robert
On 12.12.2010, at 00:35, email@hidden wrote:
> This appleScript list is a data type unique to appleScript. The Finder UI doesn't know what to do with it.
>
> If you coerce the list to text it should work.
>
> Try this:
>
> set fileList to {theFile1, theFile2}
> set oldDelims to AppleScript's text item delimiters
> set AppleScript's text item delimiters to {return}
>
> set the clipboard to fileList as text
> set AppleScript's text item delimiters to oldDelims
> the clipboard
>
> HTH,
>
> ES
> On Dec 11, 2010, at 12:53pm, Robert Krüger wrote:
>
>>
>> Hi,
>>
>> I'm failing to achieve a seemingly simple thing. I want to write files into the clipboard so they can be pasted into Finder.
>>
>> This works well for a single file, using this code:
>>
>> set theFile to POSIX file "/users/krueger/tmp/file1.dat"
>> set the clipboard to theFile
>>
>> However, when I try to put multiple files into the clipboard by the naive approach,
>>
>> set theFile1 to POSIX file "/users/krueger/tmp/file1.dat"
>> set theFile2 to POSIX file "/users/krueger/tmp/file2.dat"
>> set fileList to {theFile1, theFile2}
>> set the clipboard to fileList
>>
>> I don't get a "Paste Items" menu entry in Finder.
>>
>> When I compare clipboard info to when I actually select those files in Finder, there is a difference. With my code the clipboard data is listed a "list" while for the data put into the clipboard by Finder it is "class furl".
>>
>> Any hints appreciated.
>>
>> Cheers,
>>
>> Robert
>>
>> P.S.: Is it normal that the list archive search doesn't work? I've been trying for the past two days. Browsing through the archive month by month is not really an option. Is there a non-apple searchable archive that anyone can recommend?
>>
>> _______________________________________________
>> Do not post admin requests to the list. They will be ignored.
>> AppleScript-Users mailing list (email@hidden)
>> Help/Unsubscribe/Update your Subscription:
>> Archives: http://lists.apple.com/archives/applescript-users
>>
>> This email sent to email@hidden
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden