home *** CD-ROM | disk | FTP | other *** search
- /*
- **
- ** GetFileList_Ex.thor - Example script for the GETFILELIST 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()
-
- address(thorport)
-
- GETFILELIST outstem LIST
- if(rc ~= 0) then
- do
- if(rc = 5) then REQUESTNOTIFY TEXT '"Filedatabase window not open."' BT '"_Ok"'
- if(rc = 6) then REQUESTNOTIFY TEXT '"No files selected."' BT '"_Ok"'
- if(rc = 30) then REQUESTNOTIFY TEXT '"'THOR.LASTERROR'"' BT '"_Ok"'
- exit
- end
-
- say 'You selected '||LIST.COUNT||' files'
- do i=1 to LIST.COUNT
- say 'Nr:' || LIST.FILENR.i || ' Filename: ' || LIST.FILENAME.i
- end
-
- exit
-