<doc>
	<legacy_id>1759</legacy_id>
	<name>copy</name>
	<type>command</type>

	<syntax>
		<example>copy [<i>object</i> [to {<i>card</i> |<i> group | stack</i>} ]] | [<i>chunk</i> of <i>field</i>]</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Copies <property tag="selected">selected</property> text or an <glossary tag="object">object</glossary> to the <function tag="clipboard">clipboard</function> or to a <keyword tag="card">card</keyword>, <command tag="group">group</command>, or <object tag="stack">stack</object>.</summary>

	<examples>
<example>copy </example>
<example>copy button "next" to group "container"</example>
<example><p>copy this card to stack "Project 1" </p></example>
<example>copy word -3 to -1 of field "output" </example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="2.0">2.0</changed>
		<experimental version=""></experimental>
		<nonexperimental version=""></nonexperimental>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>Objects &amp; Messages</category>
		<category>User Interaction</category>
	</classification>

	<references>
		<function tag="clipboard">clipboard Function</function>
		<function tag="copyResource">copyResource Function</function>
		<command tag="place">place Command</command>
		<command tag="clone">clone Command</command>
		<command tag="cut">cut Command</command>
		<command tag="doMenu">doMenu Command</command>
		<command tag="undo">undo Command</command>
		<command tag="paste">paste Command</command>
		<command tag="select">select Command</command>
		<property tag="clipboardData">clipboardData Property</property>
		<message tag="newButton">newButton Message</message>
		<message tag="newEPS">newEPS Message</message>
		<message tag="copyKey">copyKey Message</message>
		<message tag="newPlayer">newPlayer Message</message>
		<message tag="newField">newField Message</message>
		<message tag="newScrollbar">newScrollbar Message</message>
		<message tag="newGraphic">newGraphic Message</message>
		<message tag="newImage">newImage Message</message>
		<message tag="newBackground">newBackground Message</message>
	</references>

	<description>Use the <b>copy</b> <glossary tag="command">command</glossary> to place <glossary tag="object">objects</glossary> or text on the <function tag="clipboard">clipboard</function>, or to make a copy of an <glossary tag="object">object</glossary> without changing the contents of the <function tag="clipboard">clipboard</function>.<p></p><p><b>Parameters:</b></p><p>The <i>object</i> is any available <glossary tag="object">object</glossary>. If no <i>object</i> or <i>chunk</i> is specified, the <b>copy</b> <glossary tag="command">command</glossary> copies whatever is currently <property tag="selected">selected</property>.</p><p></p><p>If a <i>card</i>, <i>group</i>, or <i>stack</i> is specified, the <i>object</i> is placed there instead of being placed in the <function tag="clipboard">clipboard</function>, and the <function tag="clipboard">clipboard</function> is left unchanged.</p><p></p><p><b>Comments:</b></p><p>If a <i>card</i> is specified, the copied <i>object</i> must be a <keyword tag="control">control</keyword> or <command tag="group">group</command>.</p><p></p><p>If a <i>group</i> is specified, the copied <i>object</i> must be a <keyword tag="control">control</keyword>.</p><p></p><p>If a <i>stack</i> is specified, the copied <i>object</i> must be a <keyword tag="card">card</keyword>.</p><p></p><p>If a <i>chunk</i> of a <i>field</i> is specified, the specified text is copied to the <function tag="clipboard">clipboard</function> (including text styles).</p><p></p><p>If a destination <i>card</i>, <i>group</i>, or <i>stack</i> is specified, the <b>copy</b> <glossary tag="command">command</glossary> places the <property tag="ID">ID</property> <glossary tag="property">property</glossary> of the newly created <glossary tag="object">object</glossary> in the <keyword tag="it">it</keyword> <glossary tag="variable">variable</glossary>, and the appropriate <keyword tag="message box">message</keyword> is sent.</p><p></p><p></p><p></p><note>When copying from a <glossary tag="list field">list field</glossary>, only entire lines can be copied. If you specify a <i>chunk</i> that's smaller than a <keyword tag="line">line</keyword> or that crosses <keyword tag="line">line</keyword> boundaries, the <b>copy</b><glossary tag="command">command</glossary> copies the entire <keyword tag="line">line</keyword> or <keyword tag="lines">lines</keyword> containing the <i>chunk</i>.</note><p></p><p></p><p></p><change><p>The ability to copy a chunk of a field directly (without first selecting it) was added in version 2.0.</change></description>
</doc>