• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: duplicate
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: duplicate


  • Subject: Re: duplicate
  • From: Yvan KOENIG <email@hidden>
  • Date: Mon, 9 Oct 2006 22:01:19 +0200


Le 9 oct. 2006 à 21:51, Yvan KOENIG a écrit :


Le 9 oct. 2006 à 21:33, Paul Berkowitz a écrit :

On 10/9/06 12:10 PM, "Adam Bell" <email@hidden> wrote:

Is this known to be broken?

set n to "someName.txt"
duplicate (choose file) to (choose folder) with properties {name:n}

That snippet won't compile in a Finder block which complains about the "{"
but since duplicate is a Standard Editions verb it doesn't need the Finder. As
is it hangs in some kind of internal problem without duplicating the file to
the chosen folder.

'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.

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.

Yvan KOENIG
 _______________________________________________
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

  • Follow-Ups:
    • Re: duplicate
      • From: Michelle Steiner <email@hidden>
    • Re: duplicate
      • From: Paul Berkowitz <email@hidden>
References: 
 >Re: duplicate (From: Paul Berkowitz <email@hidden>)
 >Re: duplicate (From: Yvan KOENIG <email@hidden>)

  • Prev by Date: Re: duplicate
  • Next by Date: Re: duplicate
  • Previous by thread: Re: duplicate
  • Next by thread: Re: duplicate
  • Index(es):
    • Date
    • Thread