Le 14 avr. 2016 à 20:31, Stan Cleveland < email@hidden> a écrit :
On Apr 14, 2016, at 03:33 AM, Yvan KOENIG < email@hidden> wrote:
Duplicate is in the Standard Suite, as well as delete, exists, make, move which apply to files. Delete, move are also in Disk-Folder-File Suite but exists and make aren't. So, with two functions matching your rule and two which don't it was not clear if duplicate belongs to one set or to the other one. Your understanding is that it's normal that duplicate doesn't apply to files. Mine was different. Maybe you are right, maybe you aren't but don't worry, I will live with this behavior.
Hi Yvan,
Your point (of dictionary inconsistency) is well taken. That's the norm, unfortunately.
However, System Events' scripting dictionary does tell exactly which commands will work with each class of object. For class 'disk item' and all of its subclasses, the command 'duplicate' is not listed. Here's the list for the 'file' class:
commands The file class responds to the following commands:
So the dictionary does tell the full story, but only in a way that requires digging and deduction.
Regards, Stan C.
Hi Stan
I know this list, but as I already wrote, the dictionary doesn't tell the full story : exists and make aren't in the given list but they apply to files. So, if we take the given list as the full story, we will not use valid commands. I prefer use exists and make, and sometimes hit the wall when by mistake I write an instruction using duplicate. As I use AppleScript since more than 16 years, I am accustomed to inconsistencies but some time I feel useful to point them in hope that they are solved. In French we say : "L'espoir fait vivre"
Yvan KOENIG running El Capitan 10.11.4 in French (VALLAURIS, France) jeudi 14 avril 2016 21:23:54
|