<doc>
  <legacy_id>1192</legacy_id>
  <name>editScript</name>
  <type>message</type>
  <syntax>
    <example>editScript <i>objectID</i>,<i>atItems</i></example>
  </syntax>
  <library></library>
  <objects>
    <card/>
  </objects>
  <synonyms>
  </synonyms>
  <classification>
    <category>Writing LiveCode</category>
  </classification>
  <references>
    <command tag="edit">edit Command</command>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
    <introduced version="6.5">Added atItems.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
  </classes>
  <security>
  </security>
  <summary>Sent to the <glossary tag="current card">current card</glossary> when the <glossary tag="object">object's</glossary> <property tag="script">script</property> is opened with the <command tag="edit">edit</command> <glossary tag="command">command</glossary>.</summary>
  <examples>
    <example>on editScript theObject <code><i>-- save current script before editing</i></code></p><p>  set the oldScript of theObject to the script of theObject</p><p>  pass editScript</p><p>end editScript</example>
  </examples>
  <description>
    <p>Handle the <b>editScript</b> <keyword tag="message box">message</keyword> if you want to intercept attempts to edit a <property tag="script">script</property> via the <keyword tag="message box">message box</keyword> or a <glossary tag="handler">handler</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>objectID</i> is the long <property tag="ID">ID</property> <glossary tag="property">property</glossary> of the <glossary tag="object">object</glossary> whose <property tag="script">script</property> is about to be opened.</p><p>The <i>atItems</i> parameter may be sent if the optional edit script of object at syntax is used. By convention the atItems are used to provide a line and column that a script editor should be opened at.<p/><p><b>Comments:</b></p><p>The <b>editScript</b> <keyword tag="message box">message</keyword> is sent when you use the <command tag="edit">edit</command> command in a <glossary tag="handler">handler</glossary>. However, it is not sent when the <glossary tag="development environment">development environment</glossary> is active.</p>
  </description>
</doc>