Error getting tags :
error 404Error getting tags :
error 404 copy | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
copy
Basics
Expander triangle
Type
Command
Syntax
copy [object [to {card | group | stack} ]] | [chunk of field]
Introduced
1.0
Changed
2.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Copies selected text or an object to the clipboard or to a card, group, or stack.
Examples

copy -- copies selected object or text to clipboard
copy button "Hello" -- copies the button to the clipboard
copy this card to stack "Clippings" -- leaves clipboard unchanged
copy word -3 to -1 of field "Help" -- copies last three words

Additional Comments
Expander triangle

Use the copy command to place objects or text on the clipboard, or to make a copy of an object without changing the contents of the clipboard.

Parameters:

The object is any available object. If no object or chunk is specified, the copy command copies whatever is currently selected.

If a card, group, or stack is specified, the object is placed there instead of being placed in the clipboard, and the clipboard is left unchanged.

Comments:

If a card is specified, the copied object must be a control or group.

If a group is specified, the copied object must be a control.

If a stack is specified, the copied object must be a card.

If a chunk of a field is specified, the specified text is copied to the clipboard (including text styles).

If a destination card, group, or stack is specified, the copy command places the ID property of the newly created object in the it variable, and the appropriate message is sent.

Note: When copying from a list field, only entire lines can be copied. If you specify a chunk that's smaller than a line or that crosses line boundaries, the copycommand copies the entire line or lines containing the chunk.

Changes to Revolution:

The ability to copy a chunk of a field directly (without first selecting it) was added in version 2.0.

User Comments
Expander triangle
User thumbnail
Oliver Kenyon
StarStarStarStarStar
May 20, 2009
Note that when using the chunk of field form, a chunk expression must be passed that evaluates to a part of the field text. Examples include:


copy line 1 to -2 of field "MyText" of me
copy word 5 of field "MyText"o 10 of field em 1 to 10 of field "MyText" of me

To copy the entire contents to the clipbard:


copy char 1 to -1 of field "MyText" of me


In particular this expression will not work (as its effectively passing the command an arbitrary string to copy):


copy the text of field "MyField" of me