Creating a WPS Object
REXX Code Sample
This is a sample of creating a WPClock object on the Desktop.
/* OS2CLOCK.CMD - Install the old OS/2 WPClock desktop object */
IF RxFuncQuery('SysCreateObject') THEN CALL RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
not='not '
IF SysCreateObject('WPClock','Clock','<WP_DESKTOP>') THEN not=''
CALL CharOut '','Desktop object "Clock"' not'created successfully. Press <ENTER>... '
PULL .
EXIT
Using oo Command
You can also create the object by using this command:
oo /n WPClock
To delete the object you can execute:
oo /d "C:\Desktop\WPClock" f
WPClock is undeletable, so the 'f' forces its deletion.