move, copy and duplicate

Though I love to write applescripts, I do not know how to read dictionaries. I have made several attempts to understand dictionaries but I have failed (Please suggest me some simple but reasonably comprehensive article on dictionaries). I observe scripts, edit them and use them.
I have a simple query.

set ifile to "xyz" as alias
tell application "Finder"
	move ifile to desktop
end tell

I want to know why “move ifile” works in the above script but “copy ifile” does not work?
“duplicate ifile” does work.
Is there any difference between copy and duplicate?

Open the dictionary in Script Editor, or - more comfortable - in Script Debugger, and read the Suites, Classes and commands.

From the Finder dictionary

copy (verb)(NOT AVAILABLE YET) Copy the selected items to the clipboard (the Finder must be the front application) (from the Finder Basics suite)
command syntax

In fact, copy is an AppleScript basic command to copy a value to a variable

set a to 10

is the same as

copy 10 to a

but consider that set and copy are not always exact counterparts.
While assigning a reference to a variable copy and set behave different

Invalubale Suggestion!!! I really wished I has asked you a year earlier!!

I understood how to read the dictionaries within ten minutes of opening Script Debugger.
Here is, I believe, one of the major reasons why I could not grasp dictionaries opened in Script Editor.

Let us say, I want to create a bookmark in bookmarks bar of Camino and assign it a shortcut.
If I open the Camino dictionary in Script Editor, I see:

I can’t see “name” property or the “shortcut” property.

If do the same with Script Debugger, I see:

Now, I understand what is meant by

Script Debugger shows not only what Script Editor shows but also the inherited properties.

That’s because the other properties belong to objects higher up in the inheritance list. Bookmark inherits from bookmark item which inherits from item (the base class that all object in AS are derived from). It has only two properties:

item‚n : A scriptable object.
class (type, r/o) : The class of the object.
properties (record) : All of the object's properties.

While the Script Debugger will work fine, and I’m glad it helped you understand, it’s also important that you understand the inheritance of objects. It’s important both in AS and Cocoa and other languages like C++.

I’ve written a dictionary tutorial, don’t know if you’ve found it yet. It’s here:

Hope that helps some! :slight_smile: