home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / DIVERSEN / DIVPROG / EXCAL / EXCAL.CMD < prev    next >
Encoding:
Text File  |  1994-11-19  |  6.4 KB  |  139 lines

  1. /* Example of the REXX interface to ExCal                             */
  2. /*                                                                    */
  3. /* Those setting up many ExCal users (e.g., a LAN administrator) may  */
  4. /* want to use REXX to create an ExCal with their own places and      */
  5. /* event objects.  This REXX command file creates the same objects as */
  6. /* does the EXCINST installation routine.  The primary difference is  */
  7. /* this command file has no error checking and only does              */
  8. /* installations.  See "Programming API" in the ExCal online help for */
  9. /* more details.                                                      */
  10. /*                                                                    */
  11.  
  12. signal on novalue
  13.  
  14. say 'Please enter the full path you copied EXCAL.DLL (e.g. C:\OS2\DLL) '
  15. parse upper pull excalDLLpath .
  16.  
  17. if right(excalDLLpath,1) <> "\" then excalDLLpath = excalDLLpath || "\"
  18. excalDLL = excalDLLpath || "EXCAL.DLL";
  19.  
  20. Call RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs';
  21. Call SysLoadFuncs;           
  22.  
  23. /* start by creating the ExCal folders */
  24.  
  25. rc = SysCreateObject("WPFolder", "ExCal Folder", ,
  26.     "<WP_DESKTOP>", "OBJECTID=<EXCAL_INSTALLFOLDER>", "Update");
  27. rc = SysCreateObject("WPFolder", "Event Templates", ,
  28.     "<EXCAL_INSTALLFOLDER>", "OBJECTID=<EXCAL_EVENTSFOLDER>", "Update");
  29. rc = SysCreateObject("WPFolder", "Places", ,
  30.     "<EXCAL_INSTALLFOLDER>", "OBJECTID=<EXCAL_PLACESFOLDER>", "Update");
  31.  
  32. /* Register superclass of ExEvent and ExPlace */
  33.  
  34. rc = SysRegisterObjectClass("ExTransient", excalDLL);
  35.  
  36. /* create the event alarm and time class */
  37.  
  38. rc = SysRegisterObjectClass("ExTime", excalDLL);
  39. rc = SysRegisterObjectClass("ExAlarm", excalDLL);
  40. rc = SysCreateObject("ExAlarm", "ExCal.ALM", ,
  41.     "<WP_DESKTOP>", "OBJECTID=<EXCAL_ALARM>", "Update");
  42.  
  43. /* create places */
  44.  
  45. rc = SysRegisterObjectClass("ExPlace", excalDLL);
  46.  
  47. rc = SysCreateObject("ExPlace", "Favorite Place", ,
  48.     "<EXCAL_PLACESFOLDER>", "MAKEDEFAULT=YES", "Update");
  49. rc = SysCreateObject("ExPlace", "Office", ,
  50.     "<EXCAL_PLACESFOLDER>", "ICONRESOURCE=12 " || excalDLL, "Update");
  51. rc = SysCreateObject("ExPlace", "Restaurant", ,
  52.     "<EXCAL_PLACESFOLDER>", "ICONRESOURCE=9 " || excalDLL, "Update");
  53. rc = SysCreateObject("ExPlace", "Tourist Spot", ,
  54.     "<EXCAL_PLACESFOLDER>", "ICONRESOURCE=10 " || excalDLL, "Update");
  55. rc = SysCreateObject("ExPlace", "Vacation Spot", ,
  56.     "<EXCAL_PLACESFOLDER>", "ICONRESOURCE=11 " || excalDLL, "Update");
  57. rc = SysCreateObject("ExPlace", "Classroom", ,
  58.     "<EXCAL_PLACESFOLDER>", "ICONRESOURCE=13 " || excalDLL, "Update");
  59. rc = SysCreateObject("ExPlace", "Doctor's Office", ,
  60.     "<EXCAL_PLACESFOLDER>", "ICONRESOURCE=14 " || excalDLL, "Update");
  61. rc = SysCreateObject("ExPlace", "Home", ,
  62.     "<EXCAL_PLACESFOLDER>", "ICONRESOURCE=8 " || excalDLL, "Update");
  63. rc = SysCreateObject("ExPlace", "None", ,
  64.     "<EXCAL_PLACESFOLDER>", "ICONRESOURCE=20 " || excalDLL, "Update");
  65.  
  66. /* create events */
  67.  
  68. rc = SysRegisterObjectClass("ExEvent", excalDLL);
  69.  
  70. rc = SysCreateObject("ExEvent", "Morning Meeting", "<EXCAL_EVENTSFOLDER>", ,
  71.      "TEMPLATE=YES;STARTTIME=9:00;ENDTIME=10:00;PLACE=Office;ALARM=ON;", ,
  72.      "Update");
  73. rc = SysCreateObject("ExEvent", "Afternoon Meeting", "<EXCAL_EVENTSFOLDER>", ,
  74.      "TEMPLATE=YES;STARTTIME=13:00;ENDTIME=14:00;PLACE=Office;ALARM=ON;", ,
  75.      "Update");
  76. rc = SysCreateObject("ExEvent", "Vacation", "<EXCAL_EVENTSFOLDER>", ,
  77.      "TEMPLATE=YES;STARTTIME=9:00;ENDTIME=17:00;" || ,
  78.      "PLACE=Vacation Spot;PERSONAL=YES;", ,
  79.      "Update");
  80. rc = SysCreateObject("ExEvent", "Seminar", "<EXCAL_EVENTSFOLDER>", ,
  81.      "TEMPLATE=YES;STARTTIME=13:00;ENDTIME=17:00;PLACE=Classroom;", ,
  82.      "Update");
  83. rc = SysCreateObject("ExEvent", "Chores", "<EXCAL_EVENTSFOLDER>", ,
  84.      "TEMPLATE=YES;STARTTIME=19:00;ENDTIME=21:00;PLACE=Home;", ,
  85.      "Update");
  86. rc = SysCreateObject("ExEvent", "Lunch", "<EXCAL_EVENTSFOLDER>", ,
  87.      "TEMPLATE=YES;STARTTIME=12:00;ENDTIME=13:00;PLACE=Restaurant;", ,
  88.      "Update");
  89. rc = SysCreateObject("ExEvent", "Medical Appointment", "<EXCAL_EVENTSFOLDER>", ,
  90.      "TEMPLATE=YES;STARTTIME=10:00;ENDTIME=11:00;PLACE=Doctor's Office;", ,
  91.      "Update");
  92. rc = SysCreateObject("ExEvent", "To-do (High Priority)", ,
  93.      "TEMPLATE=YES;PRIORITY=1;STARTTIME=9:00", "Update");
  94. rc = SysCreateObject("ExEvent", "To-do (Medium-High Priority)", ,
  95.      "TEMPLATE=YES;PRIORITY=2;STARTTIME=9:00", "Update");
  96. rc = SysCreateObject("ExEvent", "To-do (Medium Priority)", ,
  97.      "TEMPLATE=YES;PRIORITY=3;STARTTIME=9:00", "Update");
  98. rc = SysCreateObject("ExEvent", "To-do (Low Priority)", ,
  99.      "TEMPLATE=YES;PRIORITY=4;STARTTIME=9:00", "Update");
  100.  
  101. rc = SysCreateObject("ExEvent", "Travel", "<EXCAL_EVENTSFOLDER>", ,
  102.      "TEMPLATE=YES;STARTTIME=12:00;ENDTIME=15:00;PLACE=None;" || ,
  103.      "ICONRESOURCE=15 " || excalDLL, "Update");
  104. rc = SysCreateObject("ExEvent", "Conference Call", "<EXCAL_EVENTSFOLDER>", ,
  105.     "TEMPLATE=YES;STARTTIME=8:30;ENDTIME=9:30;PLACE=Office;" || ,
  106.      "ICONRESOURCE=16 " || excalDLL, "Update");
  107. rc = SysCreateObject("ExEvent", "Urgent!", "<EXCAL_EVENTSFOLDER>", ,
  108.      "TEMPLATE=YES;STARTTIME=12:00;ENDTIME=12:00;PLACE=None;ALARM=ON;" || ,
  109.      "ICONRESOURCE=18 " || excalDLL, "Update");
  110. rc = SysCreateObject("ExEvent", "Reminder", "<EXCAL_EVENTSFOLDER>", ,
  111.      "TEMPLATE=YES;STARTTIME=9:00;ENDTIME=9:00;PLACE=None;ALARM=ON;" || ,
  112.      "PERSONAL=YES;ICONRESOURCE=23 " || excalDLL, "Update");
  113. rc = SysCreateObject("ExEvent", "Special", "<EXCAL_EVENTSFOLDER>", ,
  114.      "TEMPLATE=YES;STARTTIME=12:00;ENDTIME=12:00;PLACE=None;" || ,
  115.      "ICONRESOURCE=17 " || excalDLL, "Update");
  116.  
  117. /* create calendar */
  118.  
  119. rc = SysRegisterObjectClass("ExCalendar", excalDLL);
  120.  
  121. rc = SysCreateObject("ExCalendar", "ExCal", "<EXCAL_INSTALLFOLDER>", ,
  122.      "OBJECTID=<EXCAL_CALENDAR>", "Update");
  123. rc = SysCreateObject("ExCalendar", "ExCal To-do List", "<EXCAL_INSTALLFOLDER>", ,
  124.      "DEFAULTVIEW=TODO;OBJECTID=<EXCAL_CALENDARTODO>", "Update");
  125.  
  126. /* create address book */
  127.  
  128. rc = SysRegisterObjectClass("ExPerson", excalDLL);
  129. rc = SysRegisterObjectClass("ExAddressBook", excalDLL);
  130.  
  131. rc = SysCreateObject("ExAddressBook", "Address Book", "<EXCAL_INSTALLFOLDER>", ,
  132.      "ALWAYSSORT=YES;OBJECTID=<EXCAL_ADDRESSBOOK>", "Update");
  133.  
  134. /* done, open the install folder */
  135.  
  136. rc = SysSetObjectData("<EXCAL_INSTALLFOLDER>", ,
  137.      "ICONRESOURCE=19 " || excalDLL);
  138. rc = SysSetObjectData("<EXCAL_INSTALLFOLDER>", "OPEN=DEFAULT");
  139.