#: 11320 S10/OS9/6809 (CoCo)
09-Jul-91 02:21:58
Sb: #11315-Window switching
Fm: Kevin Darling 76703,4227
To: Ian Hodgson 72177,1762 (X)
Ian, yep you sure can. Hope this does what you need:
* script to create and select type 2 sterm window
*
(display 1b20 2 0 0 50 18 1 0 2 1b21 >/1&) >/w
Here's how that works. The "(....)>/w" starts a subshell with its standard
output pointing to a new window descriptor (and remember, scripts all begin
with the script file itself as the standard input!). Stderr is still the
current window, tho.
The subshell then runs "display ...", which dwsets to stdout (the new window)
and then selects to stdout (the new window) using the extra "2" to make sure
that the Select immediately works (stdin has to be the current window) from the
script.
Finally, Sterm is begun with its stdin/err redirected to whatever is stdout
using ">/1", which is also the new window. All this must take place within
the same subshell () because we're doing this all to one main path.
Work it through... it's kind of fun to figure it out . - kev
|