home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / wuz131.zip / WPSet.Cmd < prev    next >
OS/2 REXX Batch file  |  1994-04-17  |  679b  |  29 lines

  1. /* Rexx program to set object data */
  2. /* (c) Copyright 1993 Scott Maxwell. */
  3.  
  4. parse arg args
  5. if args = '' then signal showUsage
  6. if Left(args,1) = '"' then do
  7.   parse var args '"' where '"' data
  8.   data = Strip( data )
  9. end
  10. else
  11.   parse var args where data
  12.  
  13.  
  14. if where = '' | data = '' then do
  15. showUsage:
  16.   say "Usage: WPSet object-name object-data"
  17.   say "       Use this to set object data.  For instance, to open a folder use:"
  18.   say "       WPSet c:\os2 open=default"
  19.   exit(0)
  20. end
  21.  
  22. call RxFuncAdd 'SysSetObjectData','RexxUtil','SysSetObjectData'
  23. if SysSetObjectData(where,data) = 0 then do
  24.   say 'Error setting object data'
  25.   exit(1)
  26.   end
  27.  
  28. exit(0)
  29.