; Open a wshell window, choosing a system to log into
; please note that wshell is a commercial product and is (c) 1988 by William S. Hawes

c:DHOpts "CN2:0/0/640/200" MENU S:CNC-MenusForDnet
set 1 LOCAL
set 2 mystra
set 3 frey
set 4 peach
set 5 SCREEN
set screen Workbench

lab top
reqask body "Choose a system to log onto" gad "$1|$2|$3|$4|$5|CANCEL" title ShellTerm var host

if $host eq 1
dnet:dshrexx 8195 0 DNETREXX "console CN2:0/0/640/200/$1 [port %r]/MENU#CNC-MenusForDnet/SCREEN$screen" "stty -echo\n"
endif

if $host eq 2
dnet:dshrexx 8195 0 DNETREXX "send rsh $2\n" "console CN2:0/0/640/200/$2 [port %r]/MENU#CNC-MenusForDnet/SCREEN$screen" "x wait 3" "send stty -echo\n"
endif

if $host eq 3
dnet:dshrexx 8195 0 DNETREXX "send rsh $3\n" "console CN2:0/0/640/200/$3 [port %r]/MENU#CNC-MenusForDnet/SCREEN$screen" "x wait 3" "send stty -echo\n"
endif

if $host eq 4
dnet:dshrexx 8195 0 DNETREXX "send rsh $4\n" "console CN2:0/0/640/200/$4 [port %r]/MENU#CNC-MenusForDnet/SCREEN$screen" "x wait 3" "send stty -echo\n"
endif


; SELECT SCREEN TO OPEN WINDOW ON
if $host eq 5
set s1 Workbench
set s2 CygnusEdScreen1
reqask body "Screen to open on" gad $s1|$s2|CANCEL title ShellTerm var dpy
if $dpy eq 1
set screen $s1
endif

if $dpy eq 2
set screen $s2
endif

skip back label top
endif

