home *** CD-ROM | disk | FTP | other *** search
/ Microsoftware Monthly 19…2 Programming Power Tools / MASO9512.ISO / cpptutor / cpptutor.arj / MAKEO.CMD < prev    next >
Encoding:
Text File  |  1993-11-29  |  1.5 KB  |  76 lines

  1. /*  rexx program to make an object on the desktop */
  2.  
  3. Parse Arg Data
  4.  
  5. /* first argument is the CD drive */
  6. cddr=Word(Data,1)
  7.  
  8. /* second argument is the destination file name */
  9. destfile=Word(Data,2)
  10.  
  11. /* arguments 3 through 7 are the options */
  12. opt1=Word(Data,3)
  13. opt2=Word(Data,4)
  14. opt3=Word(Data,5)
  15. opt4=Word(Data,6)
  16. opt5=Word(Data,7)
  17.  
  18. /* if any of these are still the defaults, blank them out */
  19.  
  20. if opt1="d" then
  21.    opt1=" "
  22. if opt2="d" then
  23.    opt2=" "
  24. if opt3="d" then
  25.    opt3=" "
  26. if opt4="d" then
  27.    opt4=" "
  28. if opt5="d" then
  29.    opt5=" "
  30.  
  31. optlist=opt1" "opt2" "opt3" "opt4" "opt5
  32. /* check to see if Sys REXX functions
  33.    available.  If not, make it available.        */
  34.  
  35. result=RxFuncQuery(SysCreateObject)
  36. if result=1 then
  37. do
  38.   call RxFuncAdd 'SysCreateObject','RexxUtil','SysCreateObject'
  39. end
  40.  
  41. /* complete path of destination and options */
  42. auddd=cddr'\LLHOME\AUDIODD\'destfile' 'optlist
  43.  
  44. /* name of icon file on CD */
  45. iconfile=cddr'\cset.ico'
  46.  
  47. /* name of start command file on CD */
  48. startcom=cddr'\start.bat'
  49.  
  50. /* device driver file on hard disk */
  51.  
  52.  
  53. /* create object to start Experience C++ on desktop */
  54.  
  55. title='Experience C++'
  56. classname='WPProgram'
  57. location='<WP_DESKTOP>'
  58. setup='OBJECTID=<EXPER_WIN>;'||,
  59.       'ICONFILE='iconfile';'||,
  60.       'PROGTYPE=VDM;'||,
  61.       'EXENAME='startcom';'||,
  62.       'SET INT_DURING_IO=1;'||,
  63.       'SET DOS_DEVICE='auddd';'
  64. call BldObj
  65.  
  66. /* all done */
  67. Exit
  68.  
  69.  
  70.  
  71. /* BldObj */
  72. BldObj:
  73.  
  74. result=SysCreateObject(classname,title,location,setup,'R')
  75. Return
  76.