home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / I265.ZIP / fldshad.cmd < prev    next >
OS/2 REXX Batch file  |  1992-08-05  |  2KB  |  56 lines

  1. /* FLDSHAD.CMD: Sample code using REXXUTIL's SysCreateObject function   */
  2. /* Builds a folder on the DeskTop places a program object in it then    */
  3. /* places a shadow of the program object on the DeskTop.                */
  4. /* Mike Lamb: MIKELAMB/KGNVMC                                           */
  5. /* Load REXXUTIL */
  6. call rxfuncadd sysloadfuncs, rexxutil, sysloadfuncs
  7. call sysloadfuncs
  8.  
  9.  
  10. result = RxMessageBox("Add a Test Folder to the Desktop", ,
  11.                "Folder Demo", "EnterCancel", "Question")
  12.  
  13. if result = 2 then return 0
  14.  
  15. classname  ='WPFolder'
  16. title      ='Test Folder'
  17. location   ='<WP_DESKTOP>'
  18. setup      ='OBJECTID=<TEST2_FOLDER>'
  19. Call BldObj
  20.  
  21. result = RxMessageBox("Put a Program Object in the Folder", ,
  22.                "Folder Demo", "EnterCancel", "Question")
  23. if result = 2 then return 0
  24.  
  25. classname   ='WPProgram'
  26. title       ='SYSLEVEL-VIO'
  27. location    ='<TEST2_FOLDER>'
  28. setup       ='OBJECTID=<TEST2_SYSLVIO>;'||,
  29.              'EXENAME=\OS2\SYSLEVEL.EXE;'||,
  30.              'PROGTYPE=WINDOWABLEVIO;'
  31. Call BldObj
  32.  
  33. result = RxMessageBox("Put a Shadow Object on the Desktop" ,,
  34.                "Folder Demo", "EnterCancel", "Question")
  35. if result = 2 then return 0
  36.  
  37. classname   ='WPShadow'
  38. title       ='SYSLEVEL-VIO'
  39. location    ='<WP_DESKTOP>'
  40. setup       ='SHADOWID=<TEST2_SYSLVIO>'
  41. Call BldObj
  42.  
  43. Exit
  44.  
  45. /* Build Object */
  46. BldObj:
  47.  
  48. /* Build object using REPLACE as duplicateflag */
  49. result = SysCreateObject(classname, title, location, setup, 'R')
  50.  
  51. If result\=1 Then
  52.      junk = RxMessageBox("Object failed to create" ,,
  53.                "Demo Failure", "OK", "ERROR") ;
  54.  
  55. Return
  56.