<doc>
	<legacy_id>1843</legacy_id>
	<name>write to process</name>
	<type>command</type>

	<syntax>
		<example>write <i>value</i> to process <i>processName</i></example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Sends input to a <glossary tag="process">process</glossary> that was opened with the <command tag="open process">open process</command> <glossary tag="command">command</glossary>.</summary>

	<examples>
<example>write "test" to process "/bin/logall"</example>
	</examples>

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

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
	</platforms>

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

	<security>
		<process/>
	</security>


	<classification>
		<category>The System Environment</category>
	</classification>

	<references>
		<command tag="write to driver">write to driver Command</command>
		<command tag="read from process">read from process Command</command>
		<keyword tag="stdout">stdout Keyword</keyword>
	</references>

	<description>Use the <b>write to process</b> <glossary tag="command">command</glossary> to send input to another program.<p></p><p><b>Parameters:</b></p><p>The <i>value</i> is any <glossary tag="expression">expression</glossary> that <glossary tag="evaluate">evaluates</glossary> to a <keyword tag="string">string</keyword>.</p><p></p><p>The <i>processName</i> is case-sensitive: uppercase and lowercase characters must be exactly as they were entered in the <command tag="open process">open process</command> command. The <glossary tag="process">process</glossary> must have been opened previously with the <command tag="open process">open process</command> <glossary tag="command">command</glossary>; otherwise, an error message is <glossary tag="return">returned</glossary> in the <function tag="result">result</function>.</p><p></p><p><b>Comments:</b></p><p>The process to write to must be opened first with the <command tag="open process">open process command</command>, and the mode the <glossary tag="process">process</glossary> was opened in must be write or update. If the process is not running or is read-only, the <function tag="result">result</function> function is set to "Process is not open for write.".</p><p></p><p>If there is an error writing to the process, the <function tag="result">result</function> function <glossary tag="return">returns</glossary> the error message.</p><p></p><p></p><change><p>Support for using the <b>write to process</b> <glossary tag="command">command</glossary> on <glossary tag="OS X">OS X systems</glossary> was added in version 2.0.</change></description>
</doc>