ZealOS/docs/Doc/InFile.DD.html
2021-10-27 03:28:16 -04:00

43 lines
4 KiB
HTML
Executable file

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
<meta name="generator" content="ZealOS V1.04">
<style type="text/css">
body {background-color:#1f1f1f;}
.cF0{color:#e3e3e3;background-color:#1f1f1f;}
.cF1{color:#4f84a6;background-color:#1f1f1f;}
.cF2{color:#73a255;background-color:#1f1f1f;}
.cF3{color:#297582;background-color:#1f1f1f;}
.cF4{color:#b34f4b;background-color:#1f1f1f;}
.cF5{color:#8a52c3;background-color:#1f1f1f;}
.cF6{color:#b7822f;background-color:#1f1f1f;}
.cF7{color:#444444;background-color:#1f1f1f;}
.cF8{color:#6d6d6d;background-color:#1f1f1f;}
.cF9{color:#94bfde;background-color:#1f1f1f;}
.cFA{color:#a1ce97;background-color:#1f1f1f;}
.cFB{color:#6db4be;background-color:#1f1f1f;}
.cFC{color:#e88e88;background-color:#1f1f1f;}
.cFD{color:#ca94e8;background-color:#1f1f1f;}
.cFE{color:#d4b475;background-color:#1f1f1f;}
.cFF{color:#1f1f1f;background-color:#1f1f1f;}
</style>
</head>
<body>
<pre style="font-family:monospace;font-size:12pt">
<a name="l1"></a><span class=cF2>InFiles</span><span class=cF0> are used to generate user input to automate operations. The ZealOS tour is done with an </span><span class=cF2>InFile</span><span class=cF0>. It is akin to a
<a name="l2"></a>Unix pipe because </span><span class=cF2>StdOut</span><span class=cF0> of one gets chained into </span><span class=cF2>StdIn</span><span class=cF0> of another.
<a name="l3"></a>
<a name="l4"></a>When an </span><span class=cF2>InFile</span><span class=cF0> runs, a child task is </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/KTask.CC.html#l264"><span class=cF4>Spawn</span></a><span class=cF0>()ed which intercepts real user input and generates fake input. InFiles are </span><a href="https://zeal-operating-system.github.io/ZealOS/Doc/CosmiC.DD.html#l1"><span class=cF4>CosmiC</span></a><span class=cF0>
<a name="l5"></a>programs run by the child whose stdout goes to the parent's input buffer. </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/Job.CC.html#l312"><span class=cF4>Message</span></a><span class=cF0>() can be included in an </span><span class=cF2>InFile</span><span class=cF0> to send
<a name="l6"></a>special keys or mouse cmds to the parent. While an </span><span class=cF2>InFile</span><span class=cF0> is running, the normal input gets diverted to the InFile task and
<a name="l7"></a>can be filtered and sent back to the parent task. Unless you are driving functions which prompt for data, you can probably
<a name="l8"></a>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="l9"></a>
<a name="l10"></a>See </span><a href="https://zeal-operating-system.github.io/ZealOS/Demo/InFile/InDir.IN.html#l1"><span class=cF4>::/Demo/InFile/InDir.IN</span></a><span class=cF0>.
<a name="l11"></a>
<a name="l12"></a>Note: </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/Job.CC.html#l580"><span class=cF4>In</span></a><span class=cF0>(&quot;&quot;) can be used if all you need is to send ASCII characters. It differs from </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/Job.CC.html#l561"><span class=cF4>InStr</span></a><span class=cF0>(). You'll probably use </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/Job.CC.html#l580"><span class=cF4>In</span></a><span class=cF0>() a
<a name="l13"></a>lot and not </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/Job.CC.html#l561"><span class=cF4>InStr</span></a><span class=cF0>(). With </span><a href="https://zeal-operating-system.github.io/ZealOS/Kernel/Job.CC.html#l580"><span class=cF4>In</span></a><span class=cF0>(), for example, you can place answers to the prompts for recompiling the </span><span class=cF2>Kernel</span><span class=cF0> module during </span><span class=cF4>
<a name="l14"></a></span><a href="https://zeal-operating-system.github.io/ZealOS/System/Boot/BootHDIns.CC.html#l25"><span class=cF4>BootHDIns</span></a><span class=cF0>().
</span></pre></body>
</html>