tornateo
Technical User
- Apr 22, 2003
- 3
I currently utilize a small script which allows co workers to telnet to specific devices utilizing an flist box. It was recently expressed to me that users would find value in being able to select multiple devices simultaneously.
Basically... can I use an flist box and allow multiple selections? I need it to open a new session of Procomm with each selection after the first. Can the following script be manipulated to accomodate this?... can this even be done?
string ListItem ; Item selected from list.
integer Event ; Dialog box event.
proc main
dialogbox 0 45 96 100 100 11 "QC"
flistbox 1 5 5 90 80 "S:\tech procedures\Nate\QC41.TXT" SINGLE ListItem
pushbutton 2 28 80 40 14 "OK" ok default
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Exit button selected
IF strsearch ListItem "BSC25"
connectmanual TELNET "XXX.XXX.XXX.XXX:2100"
login()
ENDIF
IF strsearch ListItem "BSC02"
connectmanual TELNET "XXX.XXX.XXX.XXX:2200"
login()
ENDIF
.
.
.
IF strsearch ListItem "BSC64"
connectmanual TELNET "XXX.XXX.XXX.XXX:2400"
login()
ENDIF
exitwhile
endcase
default ; Exit case chosen.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
endproc
proc login
transmit "^M"
waitfor "login:"
waitquiet 1
transmit "access^M^M"
waitfor ">"
transmit "disp_dte^M"
PWTITLEBAR ListItem PERMANENT
endproc
Basically... can I use an flist box and allow multiple selections? I need it to open a new session of Procomm with each selection after the first. Can the following script be manipulated to accomodate this?... can this even be done?
string ListItem ; Item selected from list.
integer Event ; Dialog box event.
proc main
dialogbox 0 45 96 100 100 11 "QC"
flistbox 1 5 5 90 80 "S:\tech procedures\Nate\QC41.TXT" SINGLE ListItem
pushbutton 2 28 80 40 14 "OK" ok default
enddialog
while 1
dlgevent 0 Event ; Get the dialog event.
switch Event ; Evaluate the event.
case 0 ; No event occurred.
endcase
case 1 ; Exit button selected
IF strsearch ListItem "BSC25"
connectmanual TELNET "XXX.XXX.XXX.XXX:2100"
login()
ENDIF
IF strsearch ListItem "BSC02"
connectmanual TELNET "XXX.XXX.XXX.XXX:2200"
login()
ENDIF
.
.
.
IF strsearch ListItem "BSC64"
connectmanual TELNET "XXX.XXX.XXX.XXX:2400"
login()
ENDIF
exitwhile
endcase
default ; Exit case chosen.
exitwhile ; Exit the loop.
endcase
endswitch
endwhile
dlgdestroy 0 CANCEL ; Destroy the dialog box.
endproc
proc login
transmit "^M"
waitfor "login:"
waitquiet 1
transmit "access^M^M"
waitfor ">"
transmit "disp_dte^M"
PWTITLEBAR ListItem PERMANENT
endproc