ZealOS/docs/Doc/InFile.DD.html

44 lines
4 KiB
HTML
Raw Normal View History

2021-07-03 05:07:57 +01:00
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=US-ASCII">
2021-08-17 07:47:37 +01:00
<meta name="generator" content="ZealOS V1.00">
2021-07-03 05:07:57 +01:00
<style type="text/css">
body {background-color:#fef1f0;}
.cF0{color:#000000;background-color:#fef1f0;}
.cF1{color:#0148a4;background-color:#fef1f0;}
.cF2{color:#3b7901;background-color:#fef1f0;}
.cF3{color:#057c7e;background-color:#fef1f0;}
.cF4{color:#bb2020;background-color:#fef1f0;}
.cF5{color:#9e42ae;background-color:#fef1f0;}
.cF6{color:#b57901;background-color:#fef1f0;}
.cF7{color:#b2b6af;background-color:#fef1f0;}
.cF8{color:#555753;background-color:#fef1f0;}
.cF9{color:#678fbb;background-color:#fef1f0;}
.cFA{color:#82bc49;background-color:#fef1f0;}
.cFB{color:#0097a2;background-color:#fef1f0;}
.cFC{color:#e26a6a;background-color:#fef1f0;}
.cFD{color:#c671bc;background-color:#fef1f0;}
.cFE{color:#c7ab00;background-color:#fef1f0;}
.cFF{color:#fef1f0;background-color:#fef1f0;}
2021-07-03 05:07:57 +01:00
</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.
2021-07-03 05:07:57 +01:00
<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>.
2021-07-03 05:07:57 +01:00
<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>.
2021-07-03 05:07:57 +01:00
<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>().
2021-07-03 05:07:57 +01:00
</span></pre></body>
</html>