<doc>
	<legacy_id>1248</legacy_id>
	<name>send to program</name>
	<type>command</type>

	<syntax>
		<example>send <i>message</i> to {program | application} <i>programAddress</i> \  [with <i>classID</i>] [{with | without} reply]</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Sends an <glossary tag="Apple Event">Apple event</glossary> to a program.</summary>

	<examples>
<example>send "message" to program "Corporate Zone:Other Mac:LiveCode"</example>
<example>send field "output" to application "FileMaker" without reply</example>
<example><p>send "message" to program "Chrome" with "GURLGURL"</p></example>
	</examples>

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

	<objects>
	</objects>

	<platforms>
		<mac/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
	</classes>

	<security>
	</security>


	<classification>
		<category>The System Environment</category>
		<category>Networks &amp; Communication</category>
	</classification>

	<references>
		<command tag="reply">reply Command</command>
		<command tag="request appleEvent">request appleEvent Command</command>
		<command tag="request">request Command</command>
		<property tag="address">address Property</property>
		<keyword tag="without">without Keyword</keyword>
		<message tag="appleEvent">appleEvent Message</message>
	</references>

	<description>Use the <b>send to program</b> <glossary tag="command">command</glossary> to cause another application to take some action via the  <glossary tag="Apple Event">Apple event</glossary> or another <glossary tag="Apple Event">Apple event</glossary> you specify.<p></p><p><b>Parameters:</b></p><p>The <i>message</i> is the message you want the other application to <glossary tag="execute">execute</glossary> (the data attached to the <glossary tag="Apple Event">Apple event</glossary> you are sending). Its exact <function tag="format">format</function> and meaning depends on the other application.</p><p></p><p>The <i>programAddress</i> is the AppleTalk address of the other program. The AppleTalk address consists of three parts, separated by colons: the zone the other computer is in, the name of the computer, and the name of the target program. If the other computer is in the same zone as yours, you can omit the zone. If the other program is running on the same computer, you can omit both the zone and the computer name.</p><p></p><p>The <i>classID</i> is a string consisting of the 4-character <glossary tag="Apple Event">Apple event</glossary> class and the 4-<keyword tag="character">character</keyword> event ID. If you don't specify a <i>classID</i>, LiveCode uses "": theclass and the <glossary tag="event">event</glossary>.</p><p></p><p><b>Comments:</b></p><p>If the program supports the Apple event, it performs the command. If the program sends back a response, it is placed in the <b>result</b> <control_st tag="function">function</control_st>.</p><p></p><p>Theandforms are synonyms.</p><p></p><p>If you specify theform, the handler pauses until the application sends back a response. If you specify theform, the handler continues immediately without waiting. If you don't specify either form, theform is used.</p><p></p><p></p><tip>To display the process browser <glossary tag="dialog box">dialog box</glossary> and allow the user to choose a running program, use the following <glossary tag="statement">statement</glossary>:</tip><p></p><p></p><p></p><p>For more information about Apple events, see Apple Computer's technical documentation, <i>Inside Macintosh: Interapplication Communication</i>, located at &lt;<u><a href="http://developer.apple.com/techpubs/mac/IAC/IAC-2.html">http://developer.apple.com/techpubs/mac/IAC/IAC-2.html</a></u>&gt;.</p></description>
</doc>