home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 8 Other
/
08-Other.zip
/
apmt34.zip
/
FOLDERS.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-07-01
|
2KB
|
48 lines
/******************************************************************/
/* This program lists all the folders on the desktop */
/******************************************************************/
Trace off
Call RxFuncAdd 'APMTLoadFuncs','APMTEXT','APMTLoadFuncs'
Call APMTLoadFuncs
rc=INIT_SESSION(); If rc\=0 Then Signal stop
signal on halt name close
rc = SELECT_WINDOW("Desktop","5"); If rc\=0 Then Signal stop
rc = CONTAINER_QUERY_COUNT(1,"ct"); If rc\=0 Then Signal stop
do i = 1 to ct
item = "#"||i
rc = KEYBOARD("\","C"); If rc\=0 Then Signal stop
rc = CONTAINER_SELECTITEM(1,item); If rc\=0 Then Signal stop
rc = KEYBOARD("F10","S");
rc = POPUPMENU_QUERY_ALL("Open","pb");
if rc = 0 then do
if word(pb.2,1) = "~Icon" & word(pb.3,1) = "~Tree " & ,
word(pb.4,1) = "~Details" then do
rc = POPUPMENU_SELECT("Open","Settings"); If rc\=0 Then Signal stop
if rc = 0 then do
rc = WAIT(4000) If rc\=0 Then Signal stop
rc = SELECT_DIALOGWINDOW("*"); If rc\=0 Then Signal stop
rc = QUERY_TITLE("title"); If rc\=0 Then Signal stop
rc = SYSMENU_SELECT("Close"); If rc\=0 Then Signal stop
rc = LINEOUT("folders.out","Object " i "is a Folder with title "title)
end
else rc = LINEOUT("folders.out","Object with title " title "has unexpected menu")
end
end
rc = SELECT_WINDOW("Desktop","50"); If rc\=0 Then Signal stop
end
rc = KEYBOARD("ESC"); If rc\=0 Then Signal stop
close:
rc = END_SESSION();
exit
/******************************************************************/
stop:
code=Strip(rc)
Parse Value Sourceline(sigl) With 'rc = ' function ';'
Say 'Return code' code 'from' function 'in line number' sigl
Say '---> 'apmtmsg
rc=END_SESSION()
exit code