[Coco] OS/9 Command to gain keyboard control from script

Stephen H. Fischer SFischer1 at Mindspring.com
Wed Apr 1 15:16:58 EDT 2015


Hi, Robert

I found the "getnw" source in my Shell+ binder along with documentation for 2.0 and 2.1 and lots more paper about Shell+.

I never used "getnw" because as I said the Window Descriptors were understood and a new set created to make it un-necessary per the proper use of "/W".

I am still failing to find the answer to the OP question. The OS-9 L-II manual appears not have the proper documentation. I wonder if it is in the OS-9 L-I manual.

SHF

----- Original Message ----- 
From: "Robert Gault" <robert.gault at att.net>
To: "CoCoList for Color Computer Enthusiasts" <coco at maltedmedia.com>
Sent: Wednesday, April 01, 2015 7:34 AM
Subject: Re: [Coco] OS/9 Command to gain keyboard control from script


> Cocodemus wrote:
>> No, its when you call a program from a script, it takes the input from the script itself, i want to get input from keyboard itself something like
>>
>> Minted < /term
>>
>> Also how to create another window and switch to that from the script? I remember a display sequence for that
>>
>> Sent from my iPhone
> 
> Here is an example of a script I wrote which asks how many text windows I want 
> to create and then creates them. It uses a version of the "prompt" command that 
> is slightly different from that in the NitrOS-9 project.
> The command getnw asks the system for the next uninitialized window. The 
> commands shellsub and shellhex take input from the standard path and send it to 
> the shell as a shell variable. Shellsub expects $hex values. Shellhex converts 
> decimal values to $Hex for commands like display.
> 
> script is called 'textw'
> 
> * start an 80 column text window in the next available space
> * with distinctive border color
> prompt2 echo How many windows should I create? ;var.3
> *main
> if +%3<>00000
> dec.3
> getnw ! shellsub 0
> var.0=%%0; var.1=%%0
> *loop
> if +%0<>00000
> dec.0
> inc.1
> inc.1
> inc.1
> goto loop
> endif
> echo %1! shellhex 1
> iniz w%%0; display 1b 20 2 0 0 50 19 2 0 7 1b 31 7 %%1>/w%%0
> xmode /w%%0 rpr=9 dup=19 pau=1 pag=19 row=19 bso=1
> echo 80col. text /w%%0 started with procs
> shell i=/w%%0&
> goto main
> 
> There is no simple built-in function of NitrOS-9 that does what you want. You 
> will have to write ml programs and scripts.
> 
> Robert



More information about the Coco mailing list