Re: duplicate
Re: duplicate
- Subject: Re: duplicate
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 09 Oct 2006 13:11:32 -0700
- Thread-topic: duplicate
Title: Re: duplicate
On 10/9/06 1:01 PM, "Yvan KOENIG" <email@hidden> wrote:
'duplicate' is NOT a Standard Additions command, Adam. Because it is part of
the Standard Suite, i.e. a reserved AppleScript keyword, it will compile
outside a tell block. But it will not execute except in a tell block
directed to an application which has implemented it. The Finder does
implement 'duplicate', of course, but there is no 'with properties {}'
modifier, neither required nor optional.
Nor is there in any other
application which implements 'duplicate'.
Are you sure of that?
As I wrote in:
De : email@hidden
Objet : Rép : duplicate
Date : 9 octobre 2006 21:20:22 HAEC
À : email@hidden
System Events offers this feature.
(*
duplicate v : Copy object(s) and put the copies at a new location.
duplicate reference : the object for the command
to location reference : The location for the new object(s).
[with properties record] : Properties to be set in the new duplicated object(s).
*)
Right and wrong !
System Events offers the feature in its dictionary but when I try to use it, it seems that it freeze.
Missed that. Thanks. An innovation, unfortunately stillborn at the moment, you discovered.
To be sure that there is no interference between System Events and choose file/ choose folder, I put them out of the tell block but it fails:
set sourceFile to choose file
set destFolder to choose folder
tell application "System Events"
set n to "someName.txt"
duplicate sourceFile to destFolder with properties {name:n}
end tell
In fact, from the Script Editor, the Stop (red one) button remains highlited.
Ah well. Another System Events thingy gone awry. Here's looking to Leopard, hopefully, to do it right. It will be good when it works. (Or maybe this is the revenge of System 7, punishing the Apple devs for trying to change an age-old syntax of something in the Standard Suite...)
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden