home *** CD-ROM | disk | FTP | other *** search
- /*
- **
- ** ReqList_Ex.thor - Example script for the REQUESTLIST function in THOR 2.0
- **
- */
-
- options results
-
- if(substr(address(),1,4) ~= "THOR") then do
- parse arg thorport
- if~(show(p, thorport)) then do
- if ~(show(p, "THOR.01")) then do
- say "No THOR port found!"
- exit
- end
- else thorport = "THOR.01"
- end
- end
- else thorport = address()
-
- if ~show('p', 'BBSREAD') then do
- address command
- "run >nil: `GetEnv THOR/THORPath`bin/LoadBBSRead"
- "WaitForPort BBSREAD"
- end
-
- address(BBSREAD)
-
- GETBBSLIST stem BBSLIST
- if(rc ~= 0) then
- do
- address(thorport)
- REQUESTNOTIFY TEXT '"'BBSREAD.LASTERROR'"' BT '"_Ok"'
- exit
- end
-
- address(thorport)
-
- /* Single select from the BBS list */
-
- REQUESTLIST instem BBSLIST title '"Select BBS:"' SIZEGADGET
- if(rc = 0) then
- do
- sel = 'You selected: '||result
- REQUESTNOTIFY TEXT '"'sel'"' BT '"_Ok"'
- end
-
- /* Multi and dragselect from the BBS list, no sizegadget */
-
- REQUESTLIST instem BBSLIST outstem SELECTED MULTISELECT DRAGSELECT title '"Select BBSes:"'
- if(rc = 0) then
- do
- say 'You selected: '||SELECTED.COUNT
- do i=1 to SELECTED.COUNT
- say SELECTED.i
- end
- end
-
- exit
-