<doc>
	<legacy_id>1983</legacy_id>
	<name>script</name>
	<type>property</type>

	<syntax>
		<example>set the script of <i>object</i> to <i>string</i></example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Specifies the contents of an <glossary tag="object">object's</glossary> <property tag="script">script</property>.</summary>

	<examples>
<example>set the script of button 2 to empty <a name="code tag="><i>-- clear out the script</i></a></example>
<example>set the script of field "Get It" to field "Get It Script"</example>
	</examples>

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

	<objects>
		<stack/>
		<card/>
		<group/>
		<field/>
		<button/>
		<graphic/>
		<scrollbar/>
		<player/>
		<image/>
	</objects>

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

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

	<security>
	</security>


	<classification>
		<category>Writing LiveCode</category>
		<category>Standalone Applications</category>
	</classification>

	<references>
		<command tag="remove script">remove script command</command>
		<command tag="edit">edit command</command>
	</references>

	<description>
	<overview>Use the <b>script</b> property to examine or change an object's script from inside a LiveCode statement, instead of using the script editor.</overview>

		<parameters>
		</parameters>

	<value>The <b>script</b> of an object is a string consisting of handlers and comments.<p></p><p>By default, the <b>script</b> of a newly created object is empty.</p></value>
	<comments>An object's <b>script</b> is the code that controls that object. All of an object's handlers are part of its <b>script</b> property.<p></p><p>You can view and change a script directly by selecting the object and choosing Object menu. Use the <b>script</b> property within a handler to check the contents of a script, or change the script.</p><p></p><p>LiveCode compiles the script immediately after it is set. This means that it is not possible to write a self-modifying handler, because the currently-executing handler would have to be changed and re-compiled while it was running.</p></comments>
	</description>
</doc>