<doc>
	<legacy_id>2198</legacy_id>
	<name>insert script</name>
	<type>command</type>

	<syntax>
		<example>insert [the] script of <i>object </i>into {front | back}</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Places an <glossary tag="object">object's</glossary> <property tag="script">script</property> into the <glossary tag="message path">message path</glossary>.</summary>

	<examples>
<example>insert the script of button "Message Library" into back</example>
<example>insert the script of this card into front</example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version=""></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>Standalone Applications</category>
	</classification>

	<references>
		<command tag="call">call command</command>
		<command tag="remove script">remove script command</command>
		<command tag="place">place command</command>
		<command tag="start using">start using command</command>
	</references>

	<description>
	<overview>Use the insert script command to use an object's script as a library for frequently-used handlers.</overview>

		<parameters>
<parameter>
<name>object</name>
<description>The object is any object in an open stack.</description> 
</parameter>		</parameters>

	<value></value>
	<comments>A script inserted into the front receives messages first, before the target object receives them. A script inserted into the back receives messages after all objects in the message path, just before the engine itself receives the message.<p></p><p>Objects added to the front or back are placed at the start of the <function tag="frontScripts">frontScripts</function> or <function tag="backscripts">backScripts</function> list:  the last-inserted object gets messages first.</p><p></p><p>Be aware that inserting scripts may make it difficult to understand how a stack behaves. If you use this command for development, be sure to carefully document which scripts are inserted, where, and when.</p></comments>
	</description>
</doc>