(view source code of listobj.cmd as plain text)
/* ListObj version 1.2 *//* List all WPS object names *//* (C) 1997-1999, Rob van der Woude *//* Latest revision 1999/03/13 *//* Initialize RexxUtil if necessary */if RxFuncQuery( "SysLoadFuncs" ) <> 0 then do
call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
call SysLoadFuncsend/* Initialize RexxLib if necessary and if available */if RxFuncQuery( "RexxLibRegister" ) = 0 then do
rexxlib = 1
endelse do
rexxlib = 0
call RxFuncAdd "RexxLibRegister", "RexxLib", "RexxLibRegister"
call RexxLibRegisterif RxFuncQuery( "RexxLibRegister" ) = 0 then rexxlib = 1
end/* Check for /P (pause) command line parameter */parse upper arg "/"option .
if option = "?" then call Syntax
pause = 0
if left( option, 1 ) = "P" then pause = 1
/* Check text screen size and position cursor if necessary */parse value SysTextScreenSize( ) with rows cols
parse value SysCurPos( ) with x y
if x = rows - 1 then do
x = rows - 2
call SysCurPos x, 0
end/* Read a list of objects from OS2.INI */call SysIni "USER", "PM_Workplace:Location", "ALL:", "object."
/* Sort the list if RexxLib is available */if rexxlib = 1 then call ArraySort "object."
/* Display the formated list on screen */call SysClssaysay " "||object.0||" WPS Objects:"
sayj = 0
do i = 1 to object.0
say " "||object.i
j = j + 1
/* Pause at full screen */if pause = 1 & j = rows - 6 then do
call AnyKeyj = 0
endend/* Pause at the end if there was anything *//* left to display after the last pause */if pause = 1 & j > 0 then call AnyKey "End"
EXIT/* Pause at full screen */AnyKey: procedure expose object.
saysay " Press any key . . ."
call SysCurState "OFF"
answer = translate( SysGetKey( "NOECHO" ) )
if translate( arg( 1 ) ) <> "END" then do
call SysCls saysay " "||object.0||" WPS Objects:"
say endreturn answer/* Display help */Syntax: procedure
call SysCls saysay " ListObj Version 1.2"
say " Display all WorkPlace Shell object names"
saysay " (C) 1997-1999, Rob van der Woude"
say saysay " Usage: LISTOBJ [ /P | /? ]"
saysay " /P pause at full screen"
say " /? display this help screen"
exitreturnpage last modified: 2025-10-11; loaded in 0.0059 seconds