home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rexxwps.zip / AllFigures.txt next >
Text File  |  1995-10-07  |  23KB  |  581 lines

  1. What follows, is a *complete* ASCII-list of the figures I submitted Miller &
  2. Freeman (producer of "OS/2 Developer") together with my article for this year's
  3. "REXX Report, Summer '95", September 95).  So it includes also the tables for 
  4. all documented keyword/value pairs of the discussed WPS object classes.
  5.  
  6.  
  7.    REXX Report    Issue: Summer '95, page 42-51
  8.    Article title: The Workplace Shell: Objects to the Core     
  9.    Author:        Rony G. Flatscher
  10.    Description:   utilizing REXX to communicate with the Workplace Shell
  11.  
  12.    Program requirements: OS/2 Warp (well, should work under 2.11 too :) )
  13.  
  14.  
  15. The figures representing the REXX-programs are in separate files of this 
  16. archive.
  17.  
  18. Also, I added a little REXX-script which allows to start seamless enhanced
  19. Windows sessions from REXX (the article itself should explain enough to be able
  20. to deal with all aspects of the WPS object classes discussed therein).
  21.                                                                
  22. Hope this helps some of you.
  23.  
  24. ---rony, 95-10-07
  25.  
  26. ===================== cut here for Figure 1 - begin ================
  27. SOMObject
  28.    SOMClass
  29.    SOMClassMgr
  30. ** WPObject
  31.       WPAbstract
  32.            WPClock
  33.            WPCountry
  34.          * WPDisk
  35.            WPKeyboard
  36.          * WPLaunchPad
  37.            WPMouse
  38.          * WPPalette
  39.             * WPColorPalette
  40.             * WPFontPalette
  41.             * WPSchemePalette
  42.            WPPower
  43.          * WPPrinter
  44.             * WPRPrinter
  45.         ** WPProgram
  46.         ** WPShadow
  47.               WPNetLink
  48.            WPShredder
  49.            WPSound
  50.            WPSpecialNeeds
  51.            WPSpool
  52.            WPSystem
  53.            WPWinConfig
  54.       WPFileSystem
  55.            WPDataFile
  56.               WPBitmap
  57.               WPIcon
  58.               WPMet
  59.               WPPif
  60.               WPPointer
  61.             * WPProgramFile
  62.                  WPCommandFile
  63.         ** WPFolder
  64.               WPDesktop
  65.               WPDrives
  66.               WPMinWinViewer
  67.               WPNetgrp
  68.               WPNetwork
  69.               WPRootFolder
  70.             * WPServer
  71.               WPSharedDir
  72.               WPStartup
  73.               WPTemplates
  74.       WPTransient
  75.            WPJob
  76.            WPPdr
  77.            WPPort
  78.            WPQdr
  79.  
  80. ---------------------------------------------------------------------
  81. Figure 1, "The Workplace Object Class Hierarchy."
  82. ===================== cut here for Figure 1 - end ==================
  83.  
  84.  
  85.  
  86.  
  87. ===================== cut here for Figure 2 - begin ================
  88.  
  89. KEYNAME      ! VALUES                ! REMARKS
  90. --------------------------------------------------------------------------------
  91. CCVIEW       ! DEFAULT, YES, NO      ! Create new view on user open ?
  92.  
  93. DEFAULTVIEW  ! SETTINGS, DEFAULT, id ! Set defautlview on user open.
  94.  
  95. HELPLIBRARY  ! filename              ! Set the help library.
  96.  
  97. HELPPANEL    ! id                    ! Set help id.
  98.  
  99. HIDEBUTTON   ! YES, NO               ! Use hide-button on window?
  100.  
  101. ICONFILE     ! filename              ! Set icon.
  102.  
  103. ICONPOS      ! x,y                   ! Set icon position in folder
  104.                                      ! in percent coordinates.
  105.  
  106. ICONRESOURCE ! id,module             ! Set DLL and icon ID within.
  107.  
  108. MINWIN       ! HIDE, VIEWER, DESKTOP ! Determine where to minimize.
  109.  
  110. NOCOPY       ! YES, NO               ! Copy of object not allowed?
  111.  
  112. NODELETE     ! YES, NO               ! Deletion of object not allowed?
  113.  
  114. NODRAG       ! YES, NO               ! Dragging of object not allowed?
  115.  
  116. NODROP       ! YES, NO               ! Dropping on object not allowed?
  117.  
  118. NOLINK       ! YES, NO               ! Creating links of object not allowed?
  119.  
  120. NOMOVE       ! YES, NO               ! Moving of object not allowed?
  121.  
  122. NOPRINT      ! YES, NO               ! Printing of object not allowed?
  123.  
  124. NORENAME     ! YES, NO               ! Renaming of object not allowed?
  125.  
  126. NOSETTINGS   ! YES, NO               ! Opening of settings page not allowed?
  127.  
  128. NOSHADOW     ! YES, NO               ! Same as NOLINK
  129.  
  130. NOTVISIBLE   ! YES, NO               ! Object not visible on desktop ?
  131.  
  132. OBJECTID     ! <name>                ! Any unique string preceeded with a "<"
  133.                                      ! and terminated with a ">".
  134.  
  135. OPEN         ! SETTINGS, DEFAULT     ! Opening settings view or default view.
  136.  
  137. TEMPLATE     ! YES, NO               ! Object is a template?
  138.  
  139. TITLE        ! Title                 ! Set title of the object.
  140. ---------------------------------------------------------------------
  141. Figure 2, "The Setup String Parameters for WPObject."
  142. ===================== cut here for Figure 2 - end ================ =
  143.  
  144.  
  145.  
  146.  
  147.  
  148. ===================== cut here for Figure 3 - begin ============== =
  149.  
  150.    REXX-FUNCTION                 ! Win*-API-CALL
  151. -----------------------------------------------------------
  152.  
  153. Querying, installing and removing WPS object classes:
  154.  
  155.  * SysQueryClassList             ! WinEnumObjectClasses()
  156.    SysRegisterObjectClass        ! WinRegisterObjectClass()
  157.    SysDeregisterObjectClass      ! WinDeregisterObjectClass()
  158.  
  159.  
  160. Creating, manipulating, deleting WPS objects:
  161.  
  162.    SysCopyObject                 ! WinCopyObject()
  163.  * SysCreateObject               ! WinCreateObject()
  164.    SysCreateShadow               ! WinCreateShadow()
  165.  * SysDestroyObject              ! WinDestroyObject()
  166.  * SysMoveObject                 ! WinMoveObject()
  167.    SysOpenObject                 ! WinOpenObject()
  168.    SysSaveObject                 ! WinSaveObject()
  169.  * SysSetObjectData              ! WinSetObjectData()
  170. ---------------------------------------------------------------------
  171. Figure 3, "The REXX WPS-interface functions being passthrus of their
  172. corresponding Win-API-calls. Cf. the REXX online help."
  173. ===================== cut here for Figure 3 - end ================ =
  174.  
  175.  
  176.  
  177. ===================== cut here for Figure 4 - begin =================
  178. /* WPS_QCLS.CMD: query and display installed WPS object classes     */
  179.  
  180. /* load OS/2's RexxUtil functions, if not loaded already            */
  181. IF RxFuncQuery('SysLoadFuncs') THEN
  182. DO
  183.     CALL RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  184.     CALL SysLoadFuncs
  185. END
  186.  
  187. CALL SysQueryClassList "ObjCls."   /* get a list of object classes  */
  188. CALL sort                          /* sort in alphabetic order      */
  189.  
  190. SAY "The following WPS object classes are installed:"
  191. DO i = 1 TO ObjCls.0
  192.    PARSE VAR ObjCls.i classname classDLL
  193.    SAY RIGHT(i, 4) LEFT(classname" ", 35, ".") classDLL
  194. END
  195. EXIT
  196.  
  197. /* one of Knuth's algorithms; sort object classes in stem ObjCls.   */
  198. SORT: PROCEDURE EXPOSE ObjCls.
  199.    M = 1                           /* define M for passes           */
  200.    DO WHILE (9 * M + 4) < ObjCls.0
  201.       M = M * 3 + 1
  202.    END
  203.  
  204.    DO WHILE M > 0                  /* sort stem                     */
  205.       K = ObjCls.0 - M
  206.       DO J = 1 TO K
  207.          Q = J
  208.          DO WHILE Q > 0
  209.             L = Q + M
  210.             /* make comparisons case-independent                    */
  211.             IF TRANSLATE(ObjCls.Q) <<= TRANSLATE(ObjCls.L) THEN
  212.                LEAVE
  213.             tmp      = ObjCls.Q    /* switch elements               */
  214.             ObjCls.Q = ObjCls.L
  215.             ObjCls.L = tmp
  216.             Q = Q - M
  217.          END
  218.       END
  219.       M = M % 3
  220.    END
  221.    RETURN
  222. ---------------------------------------------------------------------
  223. Figure 4, "Querying installed WPS object classes."
  224. ===================== cut here for Figure 4 - end ===================
  225.  
  226.  
  227.  
  228.  
  229.  
  230. ===================== cut here for Figure 5 - begin =================
  231. /* WPS_NDEL.CMD: make all WPS-default objects non-deletable         */
  232.  
  233. /* query all WPS-OBJECTID's (OS2.INI, app; "PM_Workplace:Location") */
  234. CALL SysIni "USER", "PM_Workplace:Location", "ALL:", "object_id"
  235.  
  236. leadin_string = "<WP_"     /* work on WPS-objects only              */
  237. setup = "NODELETE=YES;"    /* setup string: change to not deletable */
  238. SAY "Trying to make all WPS-objects non-deletable:"; SAY
  239.  
  240. DO i = 1 TO object_id.0    /* loop over all entries                 */
  241.    IF ABBREV(object_id.i, leadin_string) THEN   /* WPS-OBJECTID ?   */
  242.    DO
  243.       ok = SysSetObjectData(object_id.i, setup) /* change state     */
  244.       SAY LEFT(object_id.i || " ", 57, ".") WORKED(ok)
  245.    END
  246. END
  247. EXIT                                    /* end of program           */
  248.  
  249.  
  250. /* procedure to indicate successful/not successful                  */
  251. WORKED: PROCEDURE
  252.    IF ARG(1) THEN RETURN "successful."
  253.              ELSE RETURN "*** NOT succesful ***"
  254. ---------------------------------------------------------------------
  255. Figure 5, "Making default WPS-objects non-deletable."
  256. ===================== cut here for Figure 5 - end ===================
  257.  
  258.  
  259.  
  260.  
  261.  
  262. ===================== cut here for Figure 6 - begin =================
  263. /* WPS_TITL.CMD: show setting a title                               */
  264.  
  265. /* setting a title with SysCreateObject                             */
  266. title = "This is a title,^this is the second line;^this the third !"
  267. objectid     = "<RGF Testfolder for title>"
  268. setup_string = "ICONPOS=15,30;OBJECTID=" || objectid || ";"
  269.  
  270. ok = SysCreateObject("WPFolder",,       /* instance of WPFolder     */
  271.                      title,,            /* object title             */
  272.                      "<WP_DESKTOP>",,   /* location: desktop        */
  273.                      setup_string,,     /* setup string             */
  274.                      "F")               /* fail, if object exists   */
  275. SAY "creating:" objectid "-" worked(ok)
  276. "@PAUSE"
  277.  
  278. /* note how to escape a semi-colon which usually ends a key-value   */
  279. setup_title = "This is a title,^this is the 2nd line^;^this the 3rd!"
  280.  
  281. setup_string = "TITLE=" || setup_title || ";"
  282. ok = SysSetObjectData(objectid, setup_string)       /* change title */
  283. SAY "changing title:" objectid "-" worked(ok)
  284. "@PAUSE"
  285.  
  286. SAY "cleaning up..."
  287. ok = SysDestroyObject(objectid)         /* delete folder            */
  288. SAY "destroying (deleting):" objectid "-" worked(ok)
  289.  
  290. EXIT
  291.  
  292. /* procedure to indicate successful/not successful                  */
  293. WORKED: PROCEDURE
  294.    IF ARG(1) THEN RETURN "successful."
  295.              ELSE RETURN "*** NOT succesful ***"
  296. ---------------------------------------------------------------------
  297. Figure 6, "Setting an object title at creation time and with SysSetObjectData."
  298. ===================== cut here for Figure 6 - end ===================
  299.  
  300.  
  301.  
  302.  
  303.  
  304. ===================== cut here for Figure 7 - begin ============== =
  305.  
  306. KEYNAME      ! VALUES                ! REMARKS
  307. --------------------------------------------------------------------------------
  308. ALWAYSSORT   ! YES, NO               ! Sort always ?
  309.  
  310. BACKGROUND   ! N,M,S,B,C             ! Set folder background, characters in this
  311.                                      ! list represent:
  312.  
  313.              ! N                     ! Image file name.
  314.              ! M                     ! Image mode, one of three characters:
  315.              !                       ! N (normal), T (tiled) or S (scaled).
  316.              ! S                     ! Scaling factor.
  317.              ! B                     ! Background type, one of two characters:
  318.              !                       ! I (image) or C (color only)
  319.              ! C                     ! Background color in RGB notation.
  320.  
  321.              ! Example with a scaled bitmap:
  322.              ! "BACKGROUND=D:\BITMAP\WARP.BMP,S,3,I"
  323.  
  324.              ! Example with cyan-like color background:
  325.              ! "BACKGROUND=(none),,,C,28 233 233"
  326.  
  327. DEFAULTVIEW  ! ICON, TREE, DETAILS   ! Default view of container.
  328.  
  329. DETAILSCLASS ! classname             ! Set object class for details.
  330.  
  331. DETAILSFONT  ! size.font_name        ! Set font for detail view (e.g. 10.Helv).
  332.  
  333. DETAILSVIEW  ! s1[,s2,...sn]         ! Set details view to ... (see WPS docs)
  334.  
  335. ICONFONT     ! size.font_name        ! Set font for icon view (e.g. 10.Helv).
  336.  
  337. ICONNFILE    ! index,filename        ! Set "open" icon, index is always 1.
  338.  
  339. ICONNRESOURCE! index,id,modname      ! Set "open" icon, icon ID within DLL;
  340.              !                       ! index is always set to 1.
  341.  
  342. ICONVIEW     ! s1[,s2,...sn]         ! Set icon view styles (see below).
  343.  
  344. ICONVIEWPOS  ! x,y,cx,cy             ! Initial view position and size of open
  345.              !                       ! folder in percentage coordinates.
  346.  
  347. OPEN         ! ICON, TREE, DETAILS,  ! Open folder in respective view.
  348.              ! DEFAULT               !
  349.  
  350. REMOVEFONTS  ! YES, NO               ! Remove instance fonts from folder?
  351.  
  352. SORTCLASS    ! classname             ! Set class object to sort by.
  353.  
  354. TREEFONT     ! size.font_name        ! Set font for tree view (e.g. 10.Helv).
  355.  
  356. TREEVIEW     ! s1[,s2,...sn]         ! Set tree view styles (see below).
  357.  
  358. WORKAREA     ! YES, NO               ! Set folder to be a workarea?
  359.  
  360.  
  361. VIEW STYLES           ! DESCRIPTION
  362. -----------------------------------------------------------------
  363.  
  364. FLOWED                ! Flowed icon view.
  365.  
  366. NONFLOWED             ! Non-flowed icon view.
  367.  
  368. NONGRID               ! Non-gridded icon view.
  369.  
  370. NORMAL                ! Normal size icons.
  371.  
  372. MINI                  ! Small icons.
  373.  
  374. INVISIBLE             ! No icons.
  375.  
  376. LINES                 ! Lines in tree view.
  377.  
  378. NOLINES               ! No lines in tree view.
  379.  
  380. You may combine view styles by delimiting the view style values with a comma,
  381. e.g. "ICONVIEW=FLOWED,MINI;".
  382. ---------------------------------------------------------------------
  383. Figure 7, "The Setup String parameters for WPFolder."
  384. ===================== cut here for Figure 7 - end ================ =
  385.  
  386.  
  387.  
  388.  
  389.  
  390. ===================== cut here for Figure 8 - begin =================
  391. /* WPS_TSTF.CMD: test folders, shadows and moving objects           */
  392.  
  393. /******* create four folders on the desktop to play with ************/
  394. DO i = 1 TO 4
  395.    objectid = "<RGF Testfolder_" || i || ">" /* unique objectid     */
  396.    title    = "Testfolder #" i
  397.    folder.i = objectid                       /* save for later use  */
  398.    y_pos = 100 - i*20                        /* placement on y-axis */
  399.    setup = "ICONPOS=5," || y_pos || ";" ||,  /* icon placement      */
  400.            "ICONVIEWPOS=15," || y_pos   ||,  /* initial folder dim: */
  401.                         ",35,20;"       ||,  /* relative to icon    */
  402.            "OBJECTID=" || objectid || ";"    /* assign objectid     */
  403.  
  404.    ok = SysCreateObject(,           /* create object                */
  405.          "WPFolder",,               /* Object type: WPS-Folder      */
  406.          title,,                    /* Title                        */
  407.          "<WP_DESKTOP>",,           /* create on desktop            */
  408.          setup,,                    /* setup-string                 */
  409.          "F")                       /* fail, if object exists       */
  410.  
  411.    SAY "creating:" objectid "-" worked(ok)
  412. END
  413. folder.0 = 4                        /* indicate 4 elements in array */
  414. SAY                                 /* display empty line           */
  415.  
  416. /******* change state-data to open folder in icon view **************/
  417. "@PAUSE"
  418. DO i = 1 TO 3                       /* open first three folders     */
  419.    setup = "OPEN=ICON;"             /* open them using icon view    */
  420.    ok = SysSetObjectData(folder.i, setup)
  421.    SAY "setup object data ["setup"] for" folder.i  "-" worked(ok)
  422. END
  423.  
  424. /******* create shadow of OS/2 Configuration Folder *****************/
  425. shadObjID = "<RGF Testshadow_1>"        /* OBJECITD of shadow       */
  426. folder.5  = shadObjID                   /* memorize                 */
  427. folder.0  = 5                           /* now we have 5 elements   */
  428. setup = "SHADOWID=<WP_CONFIG>;" ||,     /* shadow OS2-config folder */
  429.         "OBJECTID=" || shadObjID || ";" /* OBJECTID of shadow       */
  430.  
  431. ok = SysCreateObject(,                  /* create object            */
  432.       "WPShadow",,                      /* Object type: WPS-Shadow  */
  433.       title,,                           /* Title                    */
  434.       folder.1,,                        /* put into folder # 1      */
  435.       setup,,                           /* setup-string             */
  436.       "F")                              /* fail, if object exists   */
  437. SAY "creating shadow for" folder.5  "-" worked(ok)
  438. SAY                                     /* display empty line       */
  439.  
  440. /******* move Testfolder # 4 between the first three folders ********/
  441. location1 = 1                         /* shadow in folder #1        */
  442. location2 = 0                         /* folder #4 on desktop       */
  443.  
  444. DO FOREVER
  445.    SAY "Press enter to animate (enter 'exit' to end):"
  446.    PARSE UPPER PULL input             /* get input from user        */
  447.    IF LEFT(input, 1) = "E" THEN LEAVE /* just check first letter    */
  448.  
  449.    location1 = (location1 //  3) + 1  /* next folder for shadow     */
  450.    location2 = (location2 //  3) + 1  /* next folder for folder # 4 */
  451.  
  452.    ok = SysMoveObject(shadObjID, folder.location1)   /* move shadow */
  453.    SAY "moving shadow" shadObjID "to" folder.location1 "-" worked(ok)
  454.    ok = SysMoveObject(folder.4, folder.location2)    /* move folder */
  455.    SAY "moving folder" folder.4 "to" folder.location2 "-" worked(ok)
  456.    SAY                                /* display empty line         */
  457. END
  458.  
  459. /******* delete test folders ? (delete, if first letter is "Y" ******/
  460. SAY "Delete test folders ? (Yes/No)"
  461. PARSE UPPER PULL input
  462. IF LEFT(input, 1) = "Y" THEN         /* delete test folders ?       */
  463. DO i = folder.0 TO 1 BY -1           /* delete, start with # 3      */
  464.    ok = SysDestroyObject(folder.i)
  465.    SAY "destroying (deleting):" folder.i "-" worked(ok)
  466. END
  467.  
  468. EXIT
  469.  
  470. /* procedure to indicate successful/not successful                  */
  471. WORKED: PROCEDURE
  472.    IF ARG(1) THEN RETURN "successful."
  473.              ELSE RETURN "*** NOT succesful ***"
  474. ---------------------------------------------------------------------
  475. Figure 8, "Creating Folders, a Shadow and Moving objects."
  476. ===================== cut here for Figure 8 - end ===================
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483. ===================== cut here for Figure 9 - begin ================
  484.  
  485. KEYNAME      ! VALUES                     ! REMARKS
  486. --------------------------------------------------------------------------------
  487.  
  488.  
  489. ASSOCFILTER  ! filters                   ! Set filename filters.
  490.  
  491. ASSOCTYPE    ! type                      ! Set association types.
  492.  
  493. EXENAME      ! filename                  ! Program to be executed.
  494.  
  495. MAXIMIZED    ! YES, NO                   ! Maximized upon startup?
  496.  
  497. MINIMIZED    ! YES, NO                   ! Minimized upon startup?
  498.  
  499. PROGTYPE     ! FULLSCREEN                ! Full-screen OS/2 session.
  500.              ! PM                        ! PM application.
  501.              ! PROG_30_STD               ! WINOS2 standard mode.
  502.              ! PROG_31_ENH               ! WINOS2 3.1 enhanced mode.
  503.              ! PROG_31_ENHSEAMLESSCOMMON ! WINOS2 3.1 enhanced mode, seamless
  504.              !                           ! common session.
  505.              ! PROG_31_ENHSEAMLESSVDM    ! WINOS2 3.1 enhanced mode, seamless
  506.              !                           ! session.
  507.              ! PROG_31_STD               ! WINOS2 3.1 standard mode.
  508.              ! PROG_31_STDSEAMLESSCOMMON ! WINOS2 3.1 standard mode, seamless
  509.              !                           ! common session.
  510.              ! PROG_31_STDSEAMLESSVDM    ! WINOS2 3.1 standard mode, seamless
  511.              !                           ! session.
  512.              ! SEPARATEWIN               ! WINOS2 session in separate VDM.
  513.              ! VDM                       ! Full screen DOS session.
  514.              ! WIN                       ! Full screen WINOS2 session.
  515.              ! WINDOWABLEVIO             ! Windowed OS/2 session.
  516.              ! WINDOWEDVDM               ! Windowed DOS session.
  517.              ! WINDOWEDWIN               ! Windowed WINOS2 session.
  518.  
  519. NOAUTOCLOSE  ! YES, NO                   ! Do not close window upon program
  520.              !                           ! termination?
  521.  
  522. PARAMETERS   ! params                    ! Set program parameters.
  523.  
  524. SET          ! XXX=VVV                   ! Set environment variables. Set
  525.              !                           ! VDM characteristics for DOS
  526.              !                           ! sessions.
  527.  
  528. STARTUPDIR   ! pathname                  ! Set the working directory.
  529. ---------------------------------------------------------------------
  530. Figure 9, "The Setup String parameters for WPProgram."
  531. ===================== cut here for Figure 9 - end ==================
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538. ===================== cut here for Figure 10 - begin =================
  539. /* WPS_NOWH.CMD: demo setting and starting DOS-programs from nowhere*/
  540.  
  541. /* change the location to "<WP_DESKTOP>" to check the settings-page */
  542. location = "<WP_NOWHERE>"               /* the "NOWHERE"-location   */
  543.  
  544. title    = "Test of a DOS-Program from nowhere :-)"
  545. objectid = "<RGF TEST_DOS_IN_NOWHERE>"
  546. setup    = "PROGTYPE=WINDOWEDVDM;"                              ||,
  547.            "EXENAME=*;"                                         ||,
  548.            "PARAMETERS=/k mem.exe;"                             ||,
  549.            "STARTUPDIR=?:\;"                                    ||,
  550.            "SET COM_RECEIVE_BUFFER_FLUSH=SWITCH TO FOREGROUND;" ||,
  551.            "SET DOS_DEVICE=\os2\mdos\ANSI.SYS;"                 ||,
  552.            "SET DOS_VERSION=NETX.EXE^,5^,00^,255,"              ||,
  553.                            "WIN200.BIN^,10^,10^,4;"             ||,
  554.            "SET DOS_UMB=1;"                                     ||,
  555.            "SET EMS_MEMORY_LIMIT=0;"                            ||,
  556.            "SET IDLE_SECONDS=1;"                                ||,
  557.            "SET IDLE_SENSITIVITY=10;"                           ||,
  558.            "SET XMS_MEMORY_LIMIT=4096;"                         ||,
  559.            "OPEN=DEFAULT;"                                      ||,
  560.            "OBJECTID=" || objectid || ";"
  561.  
  562. ok = SysCreateObject("WPProgram", title, location, setup,,
  563.                      "R")         /* replace, if object exists      */
  564.  
  565. SAY "creating:" ojbectid "-" worked(ok)
  566. "@PAUSE"
  567.  
  568. SAY "Cleaning up ..."
  569. ok = SysDestroyObject(objectid)   /* OBJECTID of object             */
  570. SAY "destroying (deleting):" objectid "-" worked(ok)
  571.  
  572. EXIT
  573.  
  574. /* procedure to indicate successful/not successful                  */
  575. WORKED: PROCEDURE
  576.    IF ARG(1) THEN RETURN "successful."
  577.              ELSE RETURN "*** NOT succesful ***"
  578. ---------------------------------------------------------------------
  579. Figure 10, "Creating and Starting a Customized DOS-Program from Nowhere."
  580. ===================== cut here for Figure 10 - end ===================
  581.