<div dir="ltr">Jörg has it right... I am just asking the system to do automatically what a user might otherwise do manually. This is only one step less simplistic than artificially generating mouse movement and click messages and sending those to the Frame of an opened text, which I started doing but then decided was too much of a hack. TextFrames already knows how to call things, I figured I could just ask it nicely to do that for me.<div><br></div><div>I'll save the task of inventing yet another scripting language for later when (if) I think it might be an improvement to what we already have!<br><div><br></div><div>Jörg's suggestion would also work but I observed that many commands one might like to put in a batch script presume that there is an open TextFrame that they are within. It seemed simplest just to open such a frame and convince it to do something that it already has the logic to do.<br></div><div><br></div><div>Jörg's suggestion has the virtue of not requiring a recompilation of the Outer Core so long as the signature of System.Mod does not change.<br></div><div><br></div><div>However, with the addition of a CallMsg to TextFrames I can also imagine a background task that runs a script periodically (e.g. cron,) etc. so the addition of a CallMsg may be worth the bother of recompiling everything that depends on TextFrames.Mod which is, well, pretty much everything.</div></div><div><br></div><div>Thanks for taking a look at the note,</div><div>Chuck</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 2, 2020 at 9:16 AM Jörg <<a href="mailto:joerg.straube@iaeth.ch">joerg.straube@iaeth.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Chuck‘s modification was not about necessarily batching something (Batching was only his motivation) but his modification automatically opened a file on startup and executed the first command in that file, might be a Batch.Run but could also be Emulator.Start or WebBrowser.Open.<br>
<br>
Thinking of it, another approach would have been to only add some lines of code in System.Mod opening a file and execute the first command in it.<br>
<br>
br<br>
Jörg<br>
<br>
> Am 02.08.2020 um 18:02 schrieb Skulski, Wojciech <<a href="mailto:skulski@pas.rochester.edu" target="_blank">skulski@pas.rochester.edu</a>>:<br>
> <br>
> Joerg:<br>
> <br>
> batch commands almost by definition should run in background. In *nix batch commands are executed with a scripting language. I thought that both Michael and Andreas are moving in that direction, where the script is simply a sequence of Oberon commands. I thought that the design pattern is to parse the text file, figure out where is the next piece "Mod.Proc <parameters>", set Oberon.Par to it, and call the usual mechanism. A practical problem was lack of the return code, and it was implemented. The modification of the OS architecture was pretty minimal.<br>
> <br>
> I also noted that compiling a sequence of files is a form of batch. This mechanism is already implemented. It can be probably extended to a more general batch processing. It would not require major modifications of the OS.<br>
> <br>
> What I just said is probably sketchy. Excuse me if I am missing something major.<br>
> <br>
> ojtek<br>
> ________________________________________<br>
> From: Oberon [<a href="mailto:oberon-bounces@lists.inf.ethz.ch" target="_blank">oberon-bounces@lists.inf.ethz.ch</a>] on behalf of Joerg [<a href="mailto:joerg.straube@iaeth.ch" target="_blank">joerg.straube@iaeth.ch</a>]<br>
> Sent: Sunday, August 2, 2020 11:44 AM<br>
> To: ETH Oberon and related systems<br>
> Subject: [EXT] Re: [Oberon] A technote for automatically running batch job on system startup<br>
> <br>
> Chuck<br>
> <br>
> Do I understand correctly, you modified TextFrames and System and have to recompile everything.<br>
> <br>
> I wonder whether it would work as well to introduce a new „batch document“ type (something like BatchFrames inherited from TextFrames where you only add your new CallMsg?<br>
> And let System.Mod import your new BatchFrames.<br>
> <br>
> You would not have to recompile everything. It‘s an add-on to the system and only the implementation of System would change. System should not even get a new key...<br>
> <br>
> Or do I miss something?<br>
> <br>
> Jörg<br>
> <br>
> Am 02.08.2020 um 16:52 schrieb Charles Perkins <<a href="mailto:chuck@kuracali.com" target="_blank">chuck@kuracali.com</a>>:<br>
> <br>
> <br>
> Hello everybody,<br>
> <br>
> I wrote a note on how to have Oberon automatically run a startup script. I introduced two small changes to TextFrames.Mod (five lines total) introducing a 'Call Message' and then handling that message with a call to the Call procedure, and three small changes to System.Mod (eight lines total) introducing two variables, opening a viewer with a predetermined text file, and then sending the call message to the viewer at the end of system initialization.<br>
> <br>
> <a href="https://github.com/io-core/technotes/blob/main/technote013.md" rel="noreferrer" target="_blank">https://github.com/io-core/technotes/blob/main/technote013.md</a><<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_io-2Dcore_technotes_blob_main_technote013.md&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=QkKd4wswN9l1hMI7w1KfpHCUMrO4LIfJd76z61aK_8M&s=VScQlYuMBeHcSs_DeuNJsch9nj8UZDeQUgehsRN86z0&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_io-2Dcore_technotes_blob_main_technote013.md&d=DwMFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=QkKd4wswN9l1hMI7w1KfpHCUMrO4LIfJd76z61aK_8M&s=VScQlYuMBeHcSs_DeuNJsch9nj8UZDeQUgehsRN86z0&e=</a>><br>
> <br>
> I used Michael Schierl's Batch.Mod for the actual batching of commands but Andreas Pirklbauer's system would have worked just as well, or any other batching or script system. The above changes merely call the first command in a text file, the rest of what happens is up to that command.<br>
> <br>
> I did this to make building and testing my own system more automatic but I thought I'd share in case anyone found it interesting or useful<br>
> <br>
> Best Regards,<br>
> Chuck<br>
> --<br>
> <a href="mailto:Oberon@lists.inf.ethz.ch" target="_blank">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
> <a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><<a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwQFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=QkKd4wswN9l1hMI7w1KfpHCUMrO4LIfJd76z61aK_8M&s=yNFNbhNSoeT0VldTXRxguXnAEE1ZQ8bnxHcIKl9sTp8&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.inf.ethz.ch_mailman_listinfo_oberon&d=DwQFaQ&c=kbmfwr1Yojg42sGEpaQh5ofMHBeTl9EI2eaqQZhHbOU&r=uUiA_zLpwaGJIlq-_BM9w1wVOuyqPwHi3XzJRa-ybV0&m=QkKd4wswN9l1hMI7w1KfpHCUMrO4LIfJd76z61aK_8M&s=yNFNbhNSoeT0VldTXRxguXnAEE1ZQ8bnxHcIKl9sTp8&e=</a>><br>
> --<br>
> <a href="mailto:Oberon@lists.inf.ethz.ch" target="_blank">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
> <a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br>
<br>
--<br>
<a href="mailto:Oberon@lists.inf.ethz.ch" target="_blank">Oberon@lists.inf.ethz.ch</a> mailing list for ETH Oberon and related systems<br>
<a href="https://lists.inf.ethz.ch/mailman/listinfo/oberon" rel="noreferrer" target="_blank">https://lists.inf.ethz.ch/mailman/listinfo/oberon</a><br>
</blockquote></div>