Le 9 oct. 2006 à 21:10, Adam Bell a écrit : 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.
Adam Bell
Is it new ?
Looking at the dictionaries I got:
tell application "System Events" set n to "someName.txt" duplicate (choose file) to (choose folder) with properties {name:n} end tell (* 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). *) tell application "Finder" set n to "someName.txt" -- duplicate (choose file) to (choose folder) with properties {name:n} end tell
(* duplicate v : Duplicate one or more object(s) duplicate reference : the object(s) to duplicate [to location reference] : the new location for the object(s) [replacing boolean] : Specifies whether or not to replace items in the destination that have the same name as items being duplicated [routing suppressed boolean] : Specifies whether or not to autoroute items (default is false). Only applies when copying to the system folder. Å® reference : to the duplicated object(s) *)
There is NO parameter 'with' in the Finder's one.
Yvan KOENIG |