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

Stephen H. Fischer SFischer1 at Mindspring.com
Wed Apr 1 12:53:55 EDT 2015


Am I seeing a ShellPlus subroutine. The use of %%0 suggests that to me.

Any chance of your offering the source.

A third ShellPlus subroutine, WOW if true.

And perhaps not needed at all when the "/W" descriptor is set up correctly. ;( 

Another BAD example IMHO of how to use ShellPlus as I remember doing this lots of time.

Proof on line, the "Windows.s" script does this. My most used script!

http://home.mindspring.com/~sfischer666/

SHF

Warning, the spelling checker in Windows Mail may have changed that should not be changed!

----- 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 so=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