<doc>
  <legacy_id>1117</legacy_id>
  <name>exists</name>
  <type>function</type>
  <syntax>
    <example>exists(<i>object</i>)</example>
  </syntax>
  <library></library>
  <objects>
  </objects>
  <synonyms>
    <synonym>existence</synonym>
  </synonyms>
  <classification>
    <category>Objects &amp; Messages</category>
  </classification>
  <references>
    <property tag="owner">owner Property</property>
    <operator tag="there is a">there is a Operator</operator>
    <function tag="isNumber">isNumber Function</function>
    <operator tag="there is no">there is no Operator</operator>
  </references>
  <history>
    <introduced version="1.0">Added.</introduced>
  </history>
  <platforms>
    <mac/>
    <windows/>
    <linux/>
    <ios/>
    <android/>
  </platforms>
  <classes>
    <desktop/>
    <server/>
    <web/>
    <mobile/>
  </classes>
  <security>
  </security>
  <summary><glossary tag="return">Returns</glossary> true if the specified <glossary tag="object">object</glossary> exists, false if it does not.</summary>
  <examples>
    <example>exists(card field 1)</example>
    <example>exists(button "OK" of card "Preferences")</example>
  </examples>
  <description>
    <p>Use the <b>exists</b> function to make sure an <glossary tag="object">object</glossary> exists before you try to perform an action on it, or to determine whether to create an <glossary tag="object">object</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>object</i> is any <href tag="reference/object_reference.rev">object reference</href>.</p><p/><p><b>Value:</b></p><p>The <b>exists</b> function <glossary tag="return">returns</glossary> true or false.</p><p/><p><b>Comments:</b></p><p>To find out whether any of a certain type of object exist, use the <b>exists</b> <control_st tag="function">function</control_st> with the number 1. For example, exists(image 1) <glossary tag="return">returns</glossary> true if there are any <glossary tag="image">images</glossary> on the <glossary tag="current card">current card</glossary>, and false otherwise.</p><p/><p>You can also specify a chunk of a container, but in this case the <b>exists</b> <control_st tag="function">function</control_st> always <glossary tag="return">returns</glossary> true.</p><p/><p><img src="202651"/> <b>Tip:</b> To find out whether a <keyword tag="file">file</keyword> or <property tag="defaultFolder">folder</property> exists, or whether a <glossary tag="process">process</glossary> is running, use the <operator tag="there is a">there is a operator</operator>.</p>
  </description>
</doc>