<a name="l1"></a><span class=cF2>InFiles</span><span class=cF0> are used to generate user input to automate operations. The TempleOS
<a name="l2"></a>tour is done with an </span><span class=cF2>InFile</span><span class=cF0>. It reminds me of a Unix pipe because </span><span class=cF2>StdOut</span><span class=cF0> of one
<a name="l3"></a>gets chained into </span><span class=cF2>StdIn</span><span class=cF0> of another.
<a name="l5"></a>When an </span><span class=cF2>InFile</span><span class=cF0> runs, a child task is </span><a href="/Wb/Kernel/KTask.HC.HTML#l242"><span class=cF4>Spawn</span></a><span class=cF0>()ed which intercepts real user input
<a name="l6"></a>and generates fake input. InFiles are </span><a href="/Wb/Doc/HolyC.DD.HTML#l1"><span class=cF4>HolyC</span></a><span class=cF0> programs run by the child whose
<a name="l7"></a>stdout goes to the parent's input buffer. </span><a href="/Wb/Kernel/Job.HC.HTML#l259"><span class=cF4>Msg</span></a><span class=cF0>() can be included in an </span><span class=cF2>InFile</span><span class=cF0> to
<a name="l8"></a>send special keys or mouse cmds to the parent. While an </span><span class=cF2>InFile</span><span class=cF0> is running, the
<a name="l9"></a>normal input gets diverted to the InFile task and can be filtered and sent back
<a name="l10"></a>to the parent task. Unless you are driving functions which prompt for data, you
<a name="l11"></a>can probably use an </span><span class=cF2>#include</span><span class=cF0> file in place of an </span><span class=cF2>InFile</span><span class=cF0>.
<a name="l15"></a>Note: </span><a href="/Wb/Kernel/Job.HC.HTML#l482"><span class=cF4>In</span></a><span class=cF0>("") can be used if all you need is to send ASCII characters. It
<a name="l16"></a>differs from </span><a href="/Wb/Kernel/Job.HC.HTML#l464"><span class=cF4>InStr</span></a><span class=cF0>(). You'll probably use </span><a href="/Wb/Kernel/Job.HC.HTML#l482"><span class=cF4>In</span></a><span class=cF0>() a lot and not </span><a href="/Wb/Kernel/Job.HC.HTML#l464"><span class=cF4>InStr</span></a><span class=cF0>(). With </span><a href="/Wb/Kernel/Job.HC.HTML#l482"><span class=cF4>In</span></a><span class=cF0>(