home *** CD-ROM | disk | FTP | other *** search
/ Chip: 25 Years Anniversary / CHIP_25Jahre_Jubilaeum.iso / downloads / 401065 / WPO11 / Data1.cab / _FE544187796344D591BB167A90B46B3F < prev    next >
Text File  |  2003-03-07  |  51KB  |  2,056 lines

  1. numeric := RadiansToDegrees
  2.  
  3. Syntax
  4.  
  5. (Radians: numeric)
  6.  
  7. Description
  8.  
  9. Convert an angle in radians to degrees.
  10.  
  11. Return Value
  12.  
  13. Angel in radians converted to degrees.
  14.  
  15. Parameters
  16.  
  17. Radians: numeric    The angle in radians
  18.  
  19. numeric := Randomize
  20.  
  21. Syntax
  22.  
  23. ([Seed: numeric])
  24.  
  25. Description
  26.  
  27. Randomize a random number seed.
  28.  
  29. Return Value
  30.  
  31. Randomized number.
  32.  
  33. Parameters
  34.  
  35. Seed: numeric (optional)    The seed value that starts the random number generator. If missing, the current system clock is used to pick a starting seed.
  36.  
  37. numeric := RandomNumber
  38.  
  39. Syntax
  40.  
  41. ([Minimum: numeric]; [Maximum: numeric])
  42.  
  43. Description
  44.  
  45. Get a random number in a range.
  46.  
  47. If only a Minimum or Maximum value is given (see Parameters), a number between 0.0 and that value is returned. The range includes 0.0; it does not include the value. If no values are given, a number between 0.0 and 1.0 is returned. The range includes 0.0; it does not include 1.0.
  48.  
  49. Example
  50.  
  51. x = RandomNumber (Minimum:5; Maximum:100)
  52.  
  53. MessageBox (Caption:"Example"; Message:x; Style:OK!)
  54.  
  55. Return Value
  56.  
  57. Random number in a range.
  58.  
  59. Parameters
  60.  
  61. Minimum: numeric (optional)    The minimum number to generate. Default: 0.0
  62.  
  63. Maximum: numeric (optional)    The maximum number to generate. Default: 1.0
  64.  
  65. numeric := RandomSeed
  66.  
  67. Syntax
  68.  
  69. ()
  70.  
  71. Description
  72.  
  73. Get the current seed of the random number generator.
  74.  
  75. Return Value
  76.  
  77. Value of the random seed. This seed is used to generate the next random number, after which the random seed is updated to a new value.
  78.  
  79. numeric := RandomStats
  80.  
  81. Syntax
  82.  
  83. ([Statistic: enumeration])
  84.  
  85. Description
  86.  
  87. This command returns statistical information about the random numbers that have been generated.
  88.  
  89. Return Value
  90.  
  91. The requested statistic is returned.
  92.  
  93. Parameters
  94.  
  95. Statistic:
  96.  
  97. enumeration    The statistic to return.
  98.  
  99. Count! Return the count of random numbers generated so far.
  100.  
  101. Minimum! Return the minimum random number generated so far.
  102.  
  103. Maximum! Return the maximum random number generated so far.
  104.  
  105. Mean! Return the average of the random numbers generated so far.
  106.  
  107. StdDev! Return the standard deviation of the random numbers generated so far.
  108.  
  109. Variance! Return the variance of the random numbers generated so far.
  110.  
  111. Total! Return the total of all the random numbers generated so far.
  112.  
  113. Seed! Return the seed to be used to generate the next random number.
  114.  
  115. numeric := Real
  116.  
  117. Syntax
  118.  
  119. (<Value> numeric)
  120.  
  121. Description
  122.  
  123. Pass a value as an 8-byte float (DLL call in-line parameter function and OLE type casting function). See DLLCall and OLE Automation.
  124.  
  125. numeric := RegionAddListItem
  126.  
  127. Example
  128.  
  129. Syntax
  130.  
  131. (NamedRgn: string; {Item: string})
  132.  
  133. Description
  134.  
  135. Add an item to a list box, combination box, pop-up button, or custom control.
  136.  
  137. The only way to add a list item to a custom control is with RegionAddListItem, or by sending the custom control a message. DialogAddListItem does not work on custom controls.
  138.  
  139. Controls added with DialogAddControl are considered custom controls. The user is responsible for the use of these controls.
  140.  
  141. Return Value
  142.  
  143. Index (position) of the added item, or the index of the last item in a repeating group if successful, or -1 if not.
  144.  
  145. Parameters
  146.  
  147. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  148.  
  149. Item: string (repeating parameter)    One or more list items separated by a semicolon.
  150.  
  151. numeric := RegionAddListItemByIndex
  152.  
  153. Syntax
  154.  
  155. (NamedRgn: string; Item: string; Index: numeric)
  156.  
  157. Description
  158.  
  159. Add an item to a list box, combination box, pop-up button, or custom control, at a specified index. Indexes are 1 based.
  160.  
  161. The only way to add a list item to a custom control is with RegionAddListItem or RegionAddListItemByIndex, or by sending the custom control a message. DialogAddListItem does not work on custom controls.
  162.  
  163. Controls added with DialogAddControl are considered custom controls. The user is responsible for the use of these controls.
  164.  
  165. Return Value
  166.  
  167. The index (position) of the added item. Indexes are 1 based.
  168.  
  169. Parameters
  170.  
  171. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  172.  
  173. Item: string    The item to add.
  174.  
  175. Index: numeric    The index (position) where to add an item. Indexes are 1 based.
  176.  
  177. enumeration := RegionEnableWindow
  178.  
  179. Example
  180.  
  181. Syntax
  182.  
  183. (NamedRgn: string; [State: enumeration])
  184.  
  185. Description
  186.  
  187. Enable or disable mouse and keyboard input to a dialog box or control.
  188.  
  189. Return Value
  190.  
  191. If State is specified, return the previous state of the named region.
  192.  
  193. Enabled! Named region was enabled.
  194.  
  195. Disabled! Named region was disabled.
  196.  
  197. If State is left off, return the current state of the named region.
  198.  
  199. Parameters
  200.  
  201. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period. If a control ID is not specified, State affects the entire dialog box.
  202.  
  203. State: enumeration (optional)    Set mouse and keyboard input state. If left off, the current state of the named region is returned.
  204.  
  205. Disable! Disable named region.
  206.  
  207. Enable! Enable named region.
  208.  
  209. enumeration := RegionGetCheck
  210.  
  211. Example
  212.  
  213. Syntax
  214.  
  215. (NamedRgn: string)
  216.  
  217. Description
  218.  
  219. Report the state of a check box control.
  220.  
  221. Return Value
  222.  
  223. Up!
  224.  
  225. Down!
  226.  
  227. Checked!
  228.  
  229. Unchecked!
  230.  
  231. Indeterminate!
  232.  
  233. Gray! Same as Indeterminate!.
  234.  
  235. Parameters
  236.  
  237. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  238.  
  239. numeric := RegionGetChildCount
  240.  
  241. Syntax
  242.  
  243. (NamedRgn: string)
  244.  
  245. Description
  246.  
  247. Returns the count of the child controls that belong to the specified region. A list of child windows can be retrieved by calling the RegionGetHandle command with an Index parameter from 1 to the value to be returns by this command.
  248.  
  249. Return Value
  250.  
  251. The count of child windows. Returns 0 if there was an error or if there are no child windows.
  252.  
  253. Parameters
  254.  
  255. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  256.  
  257. numeric := RegionGetFocus
  258.  
  259. Description
  260.  
  261. Return the window handle of the region that currently has focus.
  262.  
  263. Return Value
  264.  
  265. The window handle of the window with focus.
  266.  
  267. string := RegionGetClass
  268.  
  269. Example
  270.  
  271. Syntax
  272.  
  273. (NamedRgn: string)
  274.  
  275. Description
  276.  
  277. Return the class name (Windows) of a named region.
  278.  
  279. Return Value
  280.  
  281. Windows class name.
  282.  
  283. Parameters
  284.  
  285. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  286.  
  287. numeric := RegionGetHandle
  288.  
  289. Example
  290.  
  291. Syntax
  292.  
  293. (NamedRgn: string [; Index enumeration)
  294.  
  295. Description
  296.  
  297. Return the window handle of a named region.
  298.  
  299. Return Value
  300.  
  301. If the named region does not exist, use OnError to handle error message.
  302.  
  303. Parameters
  304.  
  305. NamedRgn: string    The Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  306.  
  307. If the control ID is not specified, the Window handle of the dialog box is returned.
  308.  
  309. Index: enumeration [optional]    Lets you specify which handle to retrieve. If this parameter is omitted, RegionGetHandle uses the Self! enumeration.
  310.  
  311. Parent! Return the handle of the parent of this region.
  312.  
  313. Self! Return the handle of this region.
  314.  
  315. Child! A base value that you add to a numeric 1 based index to return the handle of the specified child. The valid values are 1 to the return value of the RegionGetChildCountcommand.
  316.  
  317. numeric := RegionGetID
  318.  
  319. Syntax
  320.  
  321. ([NamedRgn: string])
  322.  
  323. Description
  324.  
  325. This command returns the window control ID of this region within its parent.
  326.  
  327. Return Value
  328.  
  329. The window control ID. Returns 0 if it has no control ID.
  330.  
  331. Parameters
  332.  
  333. NamedRgn: string    The named region to access.
  334.  
  335. string := RegionGetListContents
  336.  
  337. Syntax
  338.  
  339. (NamedRgn: string; [ItemSeparator: string])
  340.  
  341. Description
  342.  
  343. Retrieve all the items in a specified list control.
  344.  
  345. Return Value
  346.  
  347. Text of items separated by the item separator.
  348.  
  349. Parameters
  350.  
  351. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region (list control). Enclose IDs in double quotation marks, separated by a period.
  352.  
  353. ItemSeparator: string (optional)    String used to separate items in the return value. If missing, ";" is used.
  354.  
  355. numeric := RegionGetListCount
  356.  
  357. Example
  358.  
  359. Syntax
  360.  
  361. (NamedRgn: string)
  362.  
  363. Description
  364.  
  365. Return the number of items in a list or combo box, or pop-up button.
  366.  
  367. Parameters
  368.  
  369. NamedRgn: string    The Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  370.  
  371. numeric := RegionGetListItem
  372.  
  373. Syntax
  374.  
  375. (NamedRgn: string; Item: string)
  376.  
  377. Description
  378.  
  379. Return the index of an item in a list control.
  380.  
  381. Return Value
  382.  
  383. Index (position) of a list item, or -1 on error.
  384.  
  385. Parameters
  386.  
  387. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  388.  
  389. Item: string    The list item.
  390.  
  391. string := RegionGetListItemByIndex
  392.  
  393. Syntax
  394.  
  395. (NamedRgn: string; Index: numeric)
  396.  
  397. Description
  398.  
  399. Return an item from a list control by its index.
  400.  
  401. Return Value
  402.  
  403. List item text.
  404.  
  405. Parameters
  406.  
  407. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  408.  
  409. Index: numeric    The index (position) of a list item.
  410.  
  411. numeric := RegionGetListSelectedCount
  412.  
  413. Syntax
  414.  
  415. (NamedRgn: string)
  416.  
  417. Description
  418.  
  419. Return count of the selected items in a list box, combination box, or custom control.
  420.  
  421. Return Value
  422.  
  423. The number of selected items.
  424.  
  425. Parameters
  426.  
  427. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  428.  
  429. boolean := RegionGetModified
  430.  
  431. Example
  432.  
  433. Syntax
  434.  
  435. (NamedRgn: string)
  436.  
  437. Description
  438.  
  439. Determine whether an edit control's contents have been modified (DialogAddCounter, DialogAddDate, DialogAddEditBox, DialogAddFilenameBox). See RegionSetModified.
  440.  
  441. Return Value
  442.  
  443. True if an edit control has been modified, False if not.
  444.  
  445. Parameters
  446.  
  447. NamedRgn: string    The Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  448.  
  449. string := RegionGetName
  450.  
  451. Syntax
  452.  
  453. (NamedRgn: string)
  454.  
  455. Description
  456.  
  457. This command returns the region name of the specified region. This command now works for named regions of other WordPerfect Suite applications.
  458.  
  459. Return Value
  460.  
  461. The name of the region. If the region does not belong to a user-defined macro dialog, "" is returned.
  462.  
  463. Parameters
  464.  
  465. NamedRgn: string    The named region to access.
  466.  
  467. boolean := RegionGetPosition
  468.  
  469. Syntax
  470.  
  471. (NamedRgn: string; [LeftVar: variable]; [TopVar: variable]; [WidthVar: variable]; [HeightVar: variable]; [Units: enumeration])
  472.  
  473. Description
  474.  
  475. Returns size and position information about a named region. Missing optional parameters are not returned.
  476.  
  477. Return Value
  478.  
  479. True if the specified region exists, False if not.
  480.  
  481. Parameters
  482.  
  483. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  484.  
  485. LeftVar: variable (optional)    Variable to receive the coordinate of the left edge of the region.
  486.  
  487. TopVar: variable (optional)    Variable to receive the coordinate of top edge of the region.
  488.  
  489. WidthVar: variable (optional)    Variable to receive the width of the region.
  490.  
  491. HeightVar: variable (optional)    Variable to receive the height of the region.
  492.  
  493. Units: enumeration (optional)    Type of units to return the measurements in. If missing, and the region is a region on a macro dialog, DialogUnits! is used. Otherwise, if missing, ScreenUnits! is used.
  494.  
  495. ScreenUnits! Values are returned in screen units (pixels) relative to the region's parent.
  496.  
  497. DialogUnits! Values are returned in dialog units relative to the region's parent.
  498.  
  499. Note
  500.  
  501.   If you specify DialogUnits! as the value of the Units parameter, the specified region must be a dialog. If you specify ScreenUnits! as the value of the Units parameter, the region specified may be a dialog or a non-dialog type of window.
  502.   
  503. numeric := RegionGetOrder
  504.  
  505. Syntax
  506.  
  507. ([NamedRgn: string])
  508.  
  509. Description
  510.  
  511. This command returns the 1-based order of this region within its parent.
  512.  
  513. Return Value
  514.  
  515. The order of this region. If this region has no parent, 0 is returned.
  516.  
  517. Parameters
  518.  
  519. NamedRgn: string    The named region to access.
  520.  
  521. string := RegionGetSelectedText
  522.  
  523. Example
  524.  
  525. Syntax
  526.  
  527. (NamedRgn: string; [ItemSeparator: string])
  528.  
  529. Description
  530.  
  531. Returns selected text in a control such as a list box, combination box, or counter. To return a control's full text use RegionGetWindowText.
  532.  
  533. Return Value
  534.  
  535. Selected text. If no text is selected, an empty string ("") is returned.
  536.  
  537. Parameters
  538.  
  539. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  540.  
  541. ItemSeparator: string (optional)    A string to insert between sub-string items. If missing, a semicolon is used.
  542.  
  543. numeric := RegionGetStyle
  544.  
  545. Syntax
  546.  
  547. ([NamedRgn: string]; [StyleWord: enumeration])
  548.  
  549. Description
  550.  
  551. This command returns the specified style word for the specified named region.
  552.  
  553. Parameters
  554.  
  555. NamedRgn: string    The named region to access.
  556.  
  557. StyleWord:
  558.  
  559. enumeration    The style word to receive. If missing, Styles! is used. 
  560.  
  561. Styles! Returns the styles that are specified by the Style/Option parameters of the DialogDefine and DialogAdd statements.
  562.  
  563. WindowsStyles! The Windows styles.
  564.  
  565. WindowsExStyles! The Windows extended styles.
  566.  
  567. string := RegionGetWindowText
  568.  
  569. Example
  570.  
  571. Syntax
  572.  
  573. (NamedRgn: string)
  574.  
  575. Description
  576.  
  577. Get caption bar, static text, or edit box text.
  578.  
  579. Return Value
  580.  
  581. Specified text.
  582.  
  583. Parameters
  584.  
  585. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period. To get the caption bar text, leave off the Control ID or named region. For example, vText := RegionGetWindowText ("Dialog1").
  586.  
  587. enumeration := RegionGetType
  588.  
  589. Syntax
  590.  
  591. (NamedRgn: string)
  592.  
  593. Description
  594.  
  595. This command returned the type of a specified region.
  596.  
  597. Return Value
  598.  
  599. The region type.
  600.  
  601. Dialog!
  602.  
  603. Bitmap!
  604.  
  605. Button!
  606.  
  607. CheckBox!
  608.  
  609. ColorWheel!
  610.  
  611. ComboBox! 
  612.  
  613. Counter!
  614.  
  615. Custom! Custom control type.
  616.  
  617. DateField!
  618.  
  619. EditField!
  620.  
  621. FileNameField! 
  622.  
  623. Frame!
  624.  
  625. GroupBox!
  626.  
  627. Hline! Horizontal line.
  628.  
  629. HotSpot!
  630.  
  631. HScrollBar! 
  632.  
  633. Icon!
  634.  
  635. ListBox!
  636.  
  637. NameSearchListBox!
  638.  
  639. PopDownButton!
  640.  
  641. PopUpButton!
  642.  
  643. Progress!
  644.  
  645. PushButton!
  646.  
  647. RadioButton!
  648.  
  649. RecessedTextBox!
  650.  
  651. ScrollBar!
  652.  
  653. ShadowTextBox!
  654.  
  655. StaticText!
  656.  
  657. StaticPath!
  658.  
  659. TimeField!
  660.  
  661. Viewer!
  662.  
  663. Vline!
  664.  
  665. VScrollBar!
  666.  
  667. WPComboBox!
  668.  
  669. WPEditField!
  670.  
  671. WPListBox!
  672.  
  673. WPRecessedTextBox!
  674.  
  675. WPShadowTextBox!
  676.  
  677. WPStaticText!
  678.  
  679. Unknown! 
  680.  
  681. Parameters
  682.  
  683. NamedRgn:    The named region to access.
  684.  
  685. string := RegionGetVariable
  686.  
  687. Syntax
  688.  
  689. (NamedRgn: string)
  690.  
  691. Description
  692.  
  693. This command returns the name of the associated macro variable for the specified named region.
  694.  
  695. Return Value
  696.  
  697. The name of the associated variable. If the named region is not a user-defined macro dialog, it has no associated variable and "" is returned.
  698.  
  699. Parameters
  700.  
  701. NamedRgn: string    The named region to access.
  702.  
  703. boolean := RegionIsEnabled
  704.  
  705. Syntax
  706.  
  707. (NamedRgn: string)
  708.  
  709. Description
  710.  
  711. Indicates whether a specified region is enabled.
  712.  
  713. Return Value
  714.  
  715. True if the named region is enabled, False if not.
  716.  
  717. Parameters
  718.  
  719. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region (list control). Enclose IDs in double quotation marks, separated by a period.
  720.  
  721. boolean := RegionIsVisible
  722.  
  723. Example
  724.  
  725. Syntax
  726.  
  727. (NamedRgn: string)
  728.  
  729. Description
  730.  
  731. Determine the visibility state of a region or window.
  732.  
  733. Return Value
  734.  
  735. True if visible, False if not. Window's WS_VISIBLE flag determines the return value, which can be nonzero even if the window is hidden by other windows. See your Windows 95 documentation for more information.
  736.  
  737. Parameters
  738.  
  739. NamedRgn: string    The Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  740.  
  741. RegionMoveWindow
  742.  
  743. Example
  744.  
  745. Syntax
  746.  
  747. (NamedRgn: string; [Left: numeric]; [Top: numeric]; [Width: numeric]; [Height: numeric]; [Units: enumeration])
  748.  
  749. Description
  750.  
  751. Move and/or resize a dialog box or control.
  752.  
  753. Parameters
  754.  
  755. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period. To move or resize the dialog box, leave off the Control ID or named region. For example, RegionMoveWindow ("Dialog1"; ...)
  756.  
  757. Left: numeric (optional)    The number of dialog units from the left side of the screen to the left side of the dialog box, or the number of dialog units from the left side of the dialog box to the left side of the control. If missing, no change is made.
  758.  
  759. Top: numeric (optional)    The number of dialog units from the top of the screen to the top of the dialog box, or the number of dialog units from the top of the dialog box to the top of the control. If missing, no change is made.
  760.  
  761. Width: numeric (optional)    The width of the dialog box or control in dialog units. If missing, no change is made.
  762.  
  763. Height: numeric (optional)    The height of the dialog box or control in dialog units. If missing, no change is made.
  764.  
  765. Units: enumeration (optional)    Specifies the type of units used by Left, Top, Width, and Height parameters. If missing, AbsolutePosition! is used with units appropriate to the windows type. If the window is a named region on a user-defined dialog, DialogUnits! is used. Otherwise, if missing, ScreenUnits! is used.
  766.  
  767. AppropriateUnits!
  768.  
  769. ScreenUnits!
  770.  
  771. DialogUnits! Left, Top, Width, and Height are specified in dialog units (the same units used to create the user dialog).
  772.  
  773. AbsolutePosition! Left, Top, Width, and Height are absolute positions and sizes. (Window position is always relative to its parent.)
  774.  
  775. RelativePosition! Left, Top, Width, and Height are relative to the current position and size of the window.
  776.  
  777. Note
  778.  
  779.   If you specify DialogUnits! as the value of the Units parameter, the specified region must be a dialog. If you specify ScreenUnits! as the value of the Units parameter, the region specified may be a dialog or a non-dialog type of window.
  780.   
  781. RegionRemoveListItem
  782.  
  783. Example
  784.  
  785. Syntax
  786.  
  787. (NamedRgn: string; Item: string)
  788.  
  789. Description
  790.  
  791. Remove a list item from a list box, combination box, or pop-up button. Exact match items are removed before partial match items.
  792.  
  793. Parameters
  794.  
  795. NamedRgn: string    The Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  796.  
  797. Item: string    A list item.
  798.  
  799. RegionRemoveListItemByIndex
  800.  
  801. Syntax
  802.  
  803. (NamedRgn: string; Index: numeric)
  804.  
  805. Description
  806.  
  807. Remove an item from a list control by its index.
  808.  
  809. Parameters
  810.  
  811. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  812.  
  813. Index: numeric    The index (position) of a list item.
  814.  
  815. RegionResetList
  816.  
  817. Example
  818.  
  819. Syntax
  820.  
  821. (NamedRgn: string)
  822.  
  823. Description
  824.  
  825. Clear the contents of a list box, combination box, or pop-up button.
  826.  
  827. Parameters
  828.  
  829. NamedRgn: string    The Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  830.  
  831. numeric := RegionSelectListItem
  832.  
  833. Example
  834.  
  835. Syntax
  836.  
  837. (NamedRgn: string; Item: string; [Selection: enumeration])
  838.  
  839. Description
  840.  
  841. Select an item in a list box, combination box, or pop-up button.
  842.  
  843. Return Value
  844.  
  845. Return the index (1-based) of the selected item.
  846.  
  847. Parameters
  848.  
  849. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  850.  
  851. Item: string    A list item.
  852.  
  853. Selection: enumeration (optional)    Selection options. If missing, Extend! is used. For single selection lists, Extend! works the same as Select!.
  854.  
  855. Select! Unselect all selected items, and select this item.
  856.  
  857. Unselect! Unselect this item from the current selection.
  858.  
  859. Extend! Extend the current selection to include this item.
  860.  
  861. string := RegionSelectListItemByIndex
  862.  
  863. Syntax
  864.  
  865. (NamedRgn: string; Index: numeric; [Selection: enumeration])
  866.  
  867. Description
  868.  
  869. Select an item in a list control by its index.
  870.  
  871. Return Value
  872.  
  873. The selected item.
  874.  
  875. Parameters
  876.  
  877. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  878.  
  879. Index: numeric    The index (position) of a list item.
  880.  
  881.   Selection: enumeration (optional)    The type of selection action to perform. Default: Select!
  882.  
  883. Select! Select this item after deselecting all other items.
  884.  
  885. UnSelect! Deselect this item from the current selection.
  886.  
  887. Extend! Extend the current selection to include this item.
  888.  
  889. RegionSetBitmap
  890.  
  891. Example
  892.  
  893. Syntax
  894.  
  895. (NamedRgn: string; Filename: string; [Name: string])
  896.  
  897. Description
  898.  
  899. Set a bitmap file in a bitmap control.
  900.  
  901. This token replaces RegionSetBitmapFilename, and adds the ability to use a bitmap in a DLL or EXE.
  902.  
  903. Parameters
  904.  
  905. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  906.  
  907. Filename: string    The filename of a bitmap, or the filename of a DLL or EXE containing a bitmap.
  908.  
  909. Name: string (optional)    The Resource ID, or name of a bitmap in a DLL or EXE (see the Filename parameter). IDs must begin with #.
  910.  
  911. RegionSetCheck
  912.  
  913. Example
  914.  
  915. Syntax
  916.  
  917. (NamedRgn: string; State: enumeration)
  918.  
  919. Description
  920.  
  921. Select/deselect a check box.
  922.  
  923. Parameters
  924.  
  925. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  926.  
  927. State: enumeration    Sets the state of a check box control.
  928.  
  929. Checked! (Named Check! in version 7.)
  930.  
  931. Unchecked! (Named Uncheck in version 7.)
  932.  
  933. Gray! Check box control must be Three-state or Auto three-state. See DialogAddCheckBox.
  934.  
  935. Indeterminate! Same as Gray!.
  936.  
  937. Up! Same as Checked!.
  938.  
  939. Down! Same as Unchecked!.
  940.  
  941. RegionSetEditSelection
  942.  
  943. Syntax
  944.  
  945. (NamedRgn: string; [Start: numeric]; [End: numeric])
  946.  
  947. Description
  948.  
  949. Select the text or a portion of text in a text edit control.
  950.  
  951. Parameters
  952.  
  953. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  954.  
  955. Start: numeric (optional)    The start index (position) of the text to select. If missing, all the text is selected.
  956.  
  957. End: numeric (optional)    The end index (position) of the text to select. If missing, all the text is selected.
  958.  
  959. numeric := RegionSetFocus
  960.  
  961. Example
  962.  
  963. Syntax
  964.  
  965. (NamedRgn: string)
  966.  
  967. Description
  968.  
  969. Give input focus to a specified control.
  970.  
  971. Return Value
  972.  
  973. Window handle of the region that used to have focus, or NULL if not successful.
  974.  
  975. Parameters
  976.  
  977. NamedRgn: string
  978.  
  979. (optional)    The Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period. If this parameter is missing, the focus is ot moved to a new region, but remains where it is, and current focus is returned.
  980.  
  981. RegionSetModified
  982.  
  983. Example
  984.  
  985. Syntax
  986.  
  987. (NamedRgn: string; [State: enumeration])
  988.  
  989. Description
  990.  
  991. Set the modified state of an edit control (DialogAddCounter, DialogAddDate, DialogAddEditBox, DialogAddFilenameBox). See RegionGetModified.
  992.  
  993. Parameters
  994.  
  995. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  996.  
  997. State: enumeration (optional)    If missing, Modified! is used.
  998.  
  999. Modified!
  1000.  
  1001. NotModified!
  1002.  
  1003. RegionSetProgressPercent
  1004.  
  1005. Example
  1006.  
  1007. Syntax
  1008.  
  1009. (NamedRgn: string; Percent: numeric)
  1010.  
  1011. Description
  1012.  
  1013. Set the percentage to display in a progress control. See DialogAddProgress.
  1014.  
  1015. Parameters
  1016.  
  1017. NamedRgn: string    The Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period.
  1018.  
  1019. Percent: numeric    The percentage to set.
  1020.  
  1021. RegionSetTabStops
  1022.  
  1023. Syntax
  1024.  
  1025. ([NamedRgn: string]; [Tab: numeric])
  1026.  
  1027. Description
  1028.  
  1029. This command sets the tab stops in a named region. Only certain types of regions support tab stops (i.e. listboxes) and will have no effect on other region types. The region must also have been defined with the UseTabStops! Style, or the tab stops will be ignored.
  1030.  
  1031. Parameters
  1032.  
  1033. NamedRgn: string    The name of the named region to set the tab stops from..
  1034.  
  1035. Tab:
  1036.  
  1037. numeric    The list of tab stops to apply to the listbox. These tab stops must be in ascending order or the results will be unpredictable. If this parameter is left off, the tab stops are set to a value of every 2 dialog units for the entire width of the control. If there is only one tab stop specified, all tab stops are set to this spacing for the entire width.
  1038.  
  1039. RegionSetSelectedText
  1040.  
  1041. Syntax
  1042.  
  1043. (NamedRgn: string; Item: string)
  1044.  
  1045. Description
  1046.  
  1047. Set the selected text of a named region.
  1048.  
  1049. Parameters
  1050.  
  1051. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region. Enclose IDs in double quotation marks, separated by a period.
  1052.  
  1053. Item: string    The item to select.
  1054.  
  1055. RegionSetWindowText
  1056.  
  1057. Example
  1058.  
  1059. Syntax
  1060.  
  1061. (NamedRgn: string; Item: string)
  1062.  
  1063. Description
  1064.  
  1065. Replace caption bar, static text, or edit box text.
  1066.  
  1067. Parameters
  1068.  
  1069. NamedRgn: string    The Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period. To replace the caption bar text, leave off the Control ID or named region. For example, RegionSetWindowText ("Dialog1").
  1070.  
  1071. Item: string    The replacement text.
  1072.  
  1073. RegionShowWindow
  1074.  
  1075. Example
  1076.  
  1077. Syntax
  1078.  
  1079. (NamedRgn: string; [State: enumeration])
  1080.  
  1081. Description
  1082.  
  1083. Show/hide a dialog box or control.
  1084.  
  1085. Parameters
  1086.  
  1087. NamedRgn: string    Dialog ID and control ID, or Dialog ID and name of a named region, or window handle of the named region. Enclose IDs in double quotation marks, separated by a period. If you do not use the control ID, the command works on the dialog box.
  1088.  
  1089. State: enumeration (optional)    The display state. If missing, Show! is used.
  1090.  
  1091. Hide!
  1092.  
  1093. Show!
  1094.  
  1095. ShowMinimized!
  1096.  
  1097. ShowMaximized!
  1098.  
  1099. Maximize!
  1100.  
  1101. ShowNoActivate!
  1102.  
  1103. Normal!
  1104.  
  1105. ShowNormal!
  1106.  
  1107. Minimize!
  1108.  
  1109. ShowMinNoActive!
  1110.  
  1111. ShowNA!
  1112.  
  1113. ShowRestore!
  1114.  
  1115. ShowDefault!
  1116.  
  1117. enumeration := RegistryCloseKey
  1118.  
  1119. Syntax
  1120.  
  1121. (Hkey: enumeration)
  1122.  
  1123. Description
  1124.  
  1125. Close an open key in the Windows Registry.
  1126.  
  1127. Example
  1128.  
  1129. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11\Applications")
  1130.  
  1131. RegistryCloseKey(RegKey)
  1132.  
  1133. Return Value
  1134.  
  1135. The status of the call. If successful, Success! is returned. Otherwise, an error has ocurred. 
  1136.  
  1137. Parameters
  1138.  
  1139. Hkey: enumeration    The registry Handle of the key to close. This is the key returned from RegistryOpenKey or RegistryCreateKey.
  1140.  
  1141. ClassesRoot!
  1142.  
  1143. CurrentUser!
  1144.  
  1145. LocalMachine!
  1146.  
  1147. Users!
  1148.  
  1149. PerformanceData!
  1150.  
  1151. CurrentConfig!
  1152.  
  1153. DynData!
  1154.  
  1155. Note
  1156.  
  1157.   This command is not available for use on a Linux operating system.
  1158.   
  1159. numeric := RegistryCreateKey
  1160.  
  1161. Syntax
  1162.  
  1163. (Hkey: enumeration [;SubKey: string])
  1164.  
  1165. Description
  1166.  
  1167. Create or open a key in the Windows Registry.
  1168.  
  1169. Example
  1170.  
  1171. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11")
  1172.  
  1173. CreateKey:= RegistryCreateKey(RegKey; "MyKey")
  1174.  
  1175. Prompt("RegistryCreateKey"; CreateKey;)
  1176.  
  1177. Pause
  1178.  
  1179. Return Value
  1180.  
  1181. Window handle of a created key.
  1182.  
  1183. Parameters
  1184.  
  1185. Hkey: enumeration    A handle to the key that was created. If an error occurred, Error! Is returned. 
  1186.  
  1187. Error! An error occurred creating the specified key. This value was formerly a numeric value of 0.
  1188.  
  1189. ClassesRoot! Access HKEY_CLASSES_ROOT.
  1190.  
  1191. CurrentUser! Access HKEY_CURRENT_USER.
  1192.  
  1193. LocalMachine! Access HKEY_LOCAL_MACHINE.
  1194.  
  1195. Users! Access HKEY_USERS.
  1196.  
  1197. PerformanceData! Access HKEY_PERFORMANCE_DATA.
  1198.  
  1199. CurrentConfig! Access HKEY_CURRENT_CONFIG.
  1200.  
  1201. DynData! Access HKEY_DYN_DATA.
  1202.  
  1203. SubKey: string [optional]    The name of the key to create. If missing or "", the specified key itself is created.
  1204.  
  1205. Note
  1206.  
  1207.   This command is not available for use on a Linux operating system.
  1208.   
  1209. enumeration := RegistryDeleteKey
  1210.  
  1211. Syntax
  1212.  
  1213. (Hkey: enumeration; SubKey: string)
  1214.  
  1215. Description
  1216.  
  1217. Delete a key from the Windows Registry.
  1218.  
  1219. Example
  1220.  
  1221. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11")
  1222.  
  1223. DeleteKey:= RegistryDeleteKey(RegKey; "MyKey")
  1224.  
  1225. Prompt("RegistryDeleteKey"; DeleteKey;)
  1226.  
  1227. Pause
  1228.  
  1229. Return Value
  1230.  
  1231. The status of the call. If successful, Success! is returned. Otherwise, an error has occurred. 
  1232.  
  1233. Parameters
  1234.  
  1235. Hkey: enumeration    The registry key of which to delete a subkey. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. 
  1236.  
  1237. ClassesRoot! Delete HKEY_CLASSES_ROOT.
  1238.  
  1239. CurrentUser! Delete HKEY_CURRENT_USER.
  1240.  
  1241. LocalMachine! Delete HKEY_LOCAL_MACHINE.
  1242.  
  1243. Users! Delete HKEY_USERS.
  1244.  
  1245. PerformanceData! Delete HKEY_PERFORMANCE_DATA.
  1246.  
  1247. CurrentConfig! Delete HKEY_CURRENT_CONFIG.
  1248.  
  1249. DynData! Delete HKEY_DYN_DATA.
  1250.  
  1251. SubKey: string    The key to delete.
  1252.  
  1253. Note
  1254.  
  1255.   This command is not available for use on a Linux operating system.
  1256.   
  1257. enumeration := RegistryDeleteValue
  1258.  
  1259. Syntax
  1260.  
  1261. (Hkey: enumeration; [Value: string])
  1262.  
  1263. Description
  1264.  
  1265. Delete a value from the Windows Registry.
  1266.  
  1267. Example
  1268.  
  1269. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11\MyKey\My Other SubKey")
  1270.  
  1271. DeleteValue:=RegistryDeleteValue(RegKey; )
  1272.  
  1273. Prompt("RegistryDeleteValue"; DeleteValue;)
  1274.  
  1275. Pause
  1276.  
  1277. Return Value
  1278.  
  1279. The status of the call. If cueessful, Success! is returned. Otherwise, an error has occurred. 
  1280.  
  1281. Parameters
  1282.  
  1283. Hkey: enumeration    Registry handle of key to delete. This is the key that was returned from RegistryOpenKey or RegistryCreateKey.
  1284.  
  1285. ClassesRoot! The HKEY_CLASSES_ROOT.
  1286.  
  1287. CurrentUser! The HKEY_CURRENT_USER.
  1288.  
  1289. LocalMachine! The HKEY_LOCAL_MACHINE.
  1290.  
  1291. Users! The HKEY_USERS.
  1292.  
  1293. PerformanceData! The HKEY_PERFORMANCE_DATA.
  1294.  
  1295. CurrentConfig! The HKEY_CURRENT_CONFIG.
  1296.  
  1297. DynData! The HKEY_DYN_DATA.
  1298.  
  1299. Value: string (optional)    The value to delete.
  1300.  
  1301. Note
  1302.  
  1303.   This command is not available for use on a Linux operating system.
  1304.   
  1305. string := RegistryEnumKey
  1306.  
  1307. Syntax
  1308.  
  1309. (Hkey: numeric or enumeration; SubKeyNumber: numeric)
  1310.  
  1311. Description
  1312.  
  1313. Enumerate a key from the Windows Registry.
  1314.  
  1315. Example
  1316.  
  1317. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11")
  1318.  
  1319. EnumString:=RegistryEnumKey(RegKey; 100)
  1320.  
  1321. RegError = RegistryQueryLastError()
  1322.  
  1323. Prompt("RegistryEnumKey"; "RegistryEnumKey was "+EnumString+". RegistryQueryLastError was "+RegError+".")
  1324.  
  1325. Pause
  1326.  
  1327. Return Value
  1328.  
  1329. Subkey number.
  1330.  
  1331. Parameters
  1332.  
  1333. Hkey: numeric or enumeration    Registry handle of an opened key. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. See RegistryOpenKey command for a list of the predefined registry key enumeration values.
  1334.  
  1335. ClassesRoot! The HKEY_CLASSES_ROOT.
  1336.  
  1337. CurrentUser! The HKEY_CURRENT_USER.
  1338.  
  1339. LocalMachine! The HKEY_LOCAL_MACHINE.
  1340.  
  1341. Users! The HKEY_USERS.
  1342.  
  1343. PerformanceData! The HKEY_PERFORMANCE_DATA.
  1344.  
  1345. CurrentConfig! The HKEY_CURRENT_CONFIG.
  1346.  
  1347. DynData! The HKEY_DYN_DATA.
  1348.  
  1349. SubKeyNumber: numeric    
  1350.  
  1351. Note
  1352.  
  1353.   This command is not available for use on a Linux operating system.
  1354.   
  1355. string := RegistryEnumValue
  1356.  
  1357. Syntax
  1358.  
  1359. (Hkey: numeric or enumeration; ValueNumber: numeric)
  1360.  
  1361. Description
  1362.  
  1363. Enumerate a value from the Windows Registry.
  1364.  
  1365. Example 1
  1366.  
  1367. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11\Applications")
  1368.  
  1369. EnumString:=RegistryEnumValue(RegKey; 1)
  1370.  
  1371. Prompt("RegistryEnumValue"; EnumString)
  1372.  
  1373. Pause
  1374.  
  1375. Example 2
  1376.  
  1377. //Test RegistryEnumValue with errors
  1378.  
  1379. RegKey = RegistryOpenKey(CurrentUser!; "Software\Corel\PerfectScript\11\Macro Help Files")
  1380.  
  1381. EnumString:=RegistryEnumValue(RegKey; 25)
  1382.  
  1383. RegKey:= RegistryQueryLastError()
  1384.  
  1385. Prompt("RegistryEnumValue Failure"; EnumString; Pause!)
  1386.  
  1387. Prompt("RegistryQueryLastError"; RegKey)
  1388.  
  1389. Pause
  1390.  
  1391. Return Value
  1392.  
  1393. string
  1394.  
  1395. Parameters
  1396.  
  1397. Hkey: numeric or enumeration    The registry key used to enumerate values. This is the key that was returned from the RegistryOpenKey or RegistryCreateKey.
  1398.  
  1399. ValueNumber: numeric
  1400.  
  1401. ClassesRoot! The HKEY_CLASSES_ROOT.
  1402.  
  1403. CurrentUser! The HKEY_CURRENT_USER.
  1404.  
  1405. LocalMachine! The HKEY_LOCAL_MACHINE.
  1406.  
  1407. Users! The HKEY_USERS.
  1408.  
  1409. PerformanceData! The HKEY_PERFORMANCE_DATA.
  1410.  
  1411. CurrentConfig! The HKEY_CURRENT_CONFIG.
  1412.  
  1413. DynData! The HKEY_DYN_DATA.
  1414.  
  1415. Note
  1416.  
  1417.   This command is not available for use on a Linux operating system.
  1418.   
  1419. numeric := RegistryOpenKey
  1420.  
  1421. Syntax
  1422.  
  1423. (Hkey: enumeration [; SubKey: string][Access: enumeration])
  1424.  
  1425. Description
  1426.  
  1427. Open a key in the Windows Registry.
  1428.  
  1429. Example
  1430.  
  1431. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11\Applications")
  1432.  
  1433. Return Value
  1434.  
  1435. Handle of the opened key if successful, an error code if not.
  1436.  
  1437. Parameters
  1438.  
  1439. Hkey: enumeration    Error! An error occurred opeing the specified key. This value was formerly a numeric value of 0. 
  1440.  
  1441. ClassesRoot! Access HKEY_CLASSES_ROOT.
  1442.  
  1443. CurrentUser! Access HKEY_CURRENT_USER.
  1444.  
  1445. LocalMachine! Access HKEY_LOCAL_MACHINE.
  1446.  
  1447. Users! Access HKEY_USERS.
  1448.  
  1449. PerformanceData! Access HKEY_PERFORMANCE_DATA.
  1450.  
  1451. CurrentConfig! Access HKEY_CURRENT_CONFIG.
  1452.  
  1453. DynData! Access HKEY_DYN_DATA.
  1454.  
  1455. Access:
  1456.  
  1457. enumeration    Specifies the access mode used for the Registry command on this key. I fmissing, the acess mode is the default for the platform that the macro is running on. (Win95 and Win98 do not support access rights to the Registry and all access attempts will work regardless of the access mode specified). If an attempt to access the key is made which required access that is not allowed by this parameter's value, this command will fail and generate an error.
  1458.  
  1459. ReadOnly! Items in this key will on only be read, not written
  1460.  
  1461. WriteOnly! Items in this key will only be written, not read from.
  1462.  
  1463. ReadWrite! Items in the key opened will be both read and written.
  1464.  
  1465. SubKey: string [optional]    The sub key to open. If missing, or "", then the specified key itself is opened. Full path of subkey under HKey.
  1466.  
  1467. Note
  1468.  
  1469.   This command is not available for use on a Linux operating system.
  1470.   
  1471. numeric := RegistryQueryKeyCount
  1472.  
  1473. Syntax
  1474.  
  1475. (Hkey: numeric)
  1476.  
  1477. Description
  1478.  
  1479. Get the count of subkeys under a key in the Windows Registry.
  1480.  
  1481. Example
  1482.  
  1483. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11")
  1484.  
  1485. KeyCount:=RegistryQueryKeyCount(RegKey)
  1486.  
  1487. Prompt("RegistryQueryKeyCount"; KeyCount)
  1488.  
  1489. Pause
  1490.  
  1491. Return Value
  1492.  
  1493. Key count if successful; 0 if not.
  1494.  
  1495. Parameters
  1496.  
  1497. Hkey: numeric    Key for which to return a count of the subkeys. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. See the RegistryOpenKey command for a list of the predefined registry key enumeration values.
  1498.  
  1499. ClassesRoot! The HKEY_CLASSES_ROOT.
  1500.  
  1501. CurrentUser! The HKEY_CURRENT_USER.
  1502.  
  1503. LocalMachine! The HKEY_LOCAL_MACHINE.
  1504.  
  1505. Users! The HKEY_USERS.
  1506.  
  1507. PerformanceData! The HKEY_PERFORMANCE_DATA.
  1508.  
  1509. CurrentConfig! The HKEY_CURRENT_CONFIG.
  1510.  
  1511. DynData! The HKEY_DYN_DATA.
  1512.  
  1513. Note
  1514.  
  1515.   This command is not available for use on a Linux operating system.
  1516.   
  1517. enumeration := RegistryQueryLastError
  1518.  
  1519. Syntax
  1520.  
  1521. ()
  1522.  
  1523. Description
  1524.  
  1525. Return the last error code.
  1526.  
  1527. Example
  1528.  
  1529. RegKey:= RegistryQueryLastError()
  1530.  
  1531. Prompt("RegistryQueryLastError"; RegKey)
  1532.  
  1533. Pause
  1534.  
  1535. Return Value
  1536.  
  1537. The error code associated with the last executed Registry command. If the last command was successful, Success! is returned. Any other value is considered to be an error.
  1538.  
  1539. Parameters
  1540.  
  1541. Value:
  1542.  
  1543. enumeration    Success! No error.
  1544.  
  1545. TokenError! Registry token error.
  1546.  
  1547. InvalidKey! Registry key invalid.
  1548.  
  1549. InvalidValue! Invalid value for registry.
  1550.  
  1551. NotFound! Registry key or value not found.
  1552.  
  1553. KeyMissing! Could not find the key in the registry.
  1554.  
  1555. BadIndex! On Reg.Enum...index was too large.
  1556.  
  1557. KeyOpenError! Configuration registry key could not be opened.
  1558.  
  1559. KeyReadError! Configuration registry key could not be read.
  1560.  
  1561. KeyWriteError! Configuration registry key could not be written.
  1562.  
  1563. FileIOError! Could not write registry file(s).
  1564.  
  1565. KeyDeleted! Illegal operation on a deleted registry key.
  1566.  
  1567. VolatileKey! Cannot create a stable subkey under a volatile parent key.
  1568.  
  1569. RegistryCorrupt! Registry or one of its files is corrupt.
  1570.  
  1571. UnknownError! Unknown (Uncatalogued) error.
  1572.  
  1573.  
  1574.  
  1575. Note
  1576.  
  1577. This command is not available for use on a Linux operating system.
  1578.  
  1579. any := RegistryQueryValue
  1580.  
  1581. Syntax
  1582.  
  1583. (Hkey: numeric or enumeration [; Value: string] [;Type: variable])
  1584.  
  1585. Description
  1586.  
  1587. Obtain a value from the Windows Registry.
  1588.  
  1589. Example
  1590.  
  1591. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11")
  1592.  
  1593. QueryString:=RegistryQueryValue(RegKey; "PerfectScript")
  1594.  
  1595. Prompt("RegistryQueryValue"; QueryString)
  1596.  
  1597. Pause
  1598.  
  1599. Return Value
  1600.  
  1601. Windows Registry value.
  1602.  
  1603. Parameters
  1604.  
  1605. Hkey: numeric or enumeration    The registry key in which to find a value. This is the key that was returned fro RegistryOpenKey or RegistryCreateKey. See the RegistryOpenKey command for a list of the redefined registry ey enumeration values. 
  1606.  
  1607. ClassesRoot! The HKEY_CLASSES_ROOT.
  1608.  
  1609. CurrentUser! The HKEY_CURRENT_USER.
  1610.  
  1611. LocalMachine! The HKEY_LOCAL_MACHINE.
  1612.  
  1613. Users! The HKEY_USERS.
  1614.  
  1615. PerformanceData! The HKEY_PERFORMANCE_DATA.
  1616.  
  1617. CurrentConfig! The HKEY_CURRENT_CONFIG.
  1618.  
  1619. DynData! The HKEY_DYN_DATA.
  1620.  
  1621. Value: string [optional]    The name of the  value that is returned. If misssing or "", the value of the default value of the key is retrieved.
  1622.  
  1623. Type: variable (optional)    The type of value is returned to this variable.
  1624.  
  1625. Note
  1626.  
  1627.   This command is not available for use on a Linux operating system.
  1628.   
  1629. numeric := RegistryQueryValueCount
  1630.  
  1631. Syntax
  1632.  
  1633. (Hkey: numeric or enumeration)
  1634.  
  1635. Description
  1636.  
  1637. Return the count of values under a key in the Windows Registry.
  1638.  
  1639. Example
  1640.  
  1641. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11\Location of Help Files")
  1642.  
  1643. QueryKey=RegistryQueryValueCount(RegKey)
  1644.  
  1645. Prompt("RegistryQueryValueCount"; QueryKey)
  1646.  
  1647. Pause
  1648.  
  1649. Return Value
  1650.  
  1651. Count of values under a Windows Registry key. On error, 0 is returned.
  1652.  
  1653. Parameters
  1654.  
  1655. Hkey: numeric or enumeration    Key for which to return a count of the subkeys. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. See the RegistryOpenKey command for a list of the predefined registry key enumeration values.
  1656.  
  1657. ClassesRoot! The HKEY_CLASSES_ROOT.
  1658.  
  1659. CurrentUser! The HKEY_CURRENT_USER.
  1660.  
  1661. LocalMachine! The HKEY_LOCAL_MACHINE.
  1662.  
  1663. Users! The HKEY_USERS.
  1664.  
  1665. PerformanceData! The HKEY_PERFORMANCE_DATA.
  1666.  
  1667. CurrentConfig! The HKEY_CURRENT_CONFIG.
  1668.  
  1669. DynData! The HKEY_DYN_DATA.
  1670.  
  1671. Note
  1672.  
  1673.   This command is not available for use on a Linux operating system.
  1674.   
  1675. enumeration := RegistrySetValue
  1676.  
  1677. Syntax
  1678.  
  1679. (Hkey: numeric or enumeration [; Value: string;] Data: any; Type: enumeration)
  1680.  
  1681. Description
  1682.  
  1683. Save a value in the Windows Registry.
  1684.  
  1685. Example 1
  1686.  
  1687. RegKey = RegistryOpenKey(LocalMachine!; "Software\Corel\PerfectScript\11\MyKey")
  1688.  
  1689. //CreateKey:= RegistryCreateKey(RegKey; "My SubKey")
  1690.  
  1691. SetKey := RegistrySetValue(RegKey; "My SubKey"; "Working"; PFString!)
  1692.  
  1693. Prompt("RegistrySetValue - PFString!"; "If RegistrySetValue was successful this should be a zero: "+SetKey;)
  1694.  
  1695. Pause
  1696.  
  1697. Example 2
  1698.  
  1699. CreateKey:= RegistryCreateKey(RegKey; "My Other SubKey")
  1700.  
  1701. SetKey:=RegistrySetValue(RegKey; "My Other SubKey"; "Really Working"; PFDWord!)
  1702.  
  1703. Prompt("RegistrySetValue - PFDWord!"; "If RegistrySetValue was successful this should be a zero: "+SetKey;)
  1704.  
  1705. Pause
  1706.  
  1707. Example 3
  1708.  
  1709. CreateKey:= RegistryCreateKey(RegKey; "My Other Other SubKey")
  1710.  
  1711. SetKey:=RegistrySetValue(RegKey; "My Other Other Key"; "It's Working"; DWord!)
  1712.  
  1713. Prompt("RegistrySetValue - DWord!"; "If RegistrySetValue was successful this should be a zero: "+SetKey;)
  1714.  
  1715. Pause
  1716.  
  1717. Return Value
  1718.  
  1719. The status of the call. If successful, Success! is returned. Otherwise, an error has occurred. See the RegistryQueryLast error command for a list of error enumerations. When an attempt to access an item belonging to this key is made, and the key was opened/created without the proper access mode, then the enumeration AccessDenied! Is returned.
  1720.  
  1721. AccessDenied! Returned when the current user does not have the proper access rights needed to access a specified registry key in the specified manner. For example, a non-administrator user will ge tthis return code when a key in LocalMachine! Is opened for WriteOnly! Or ReadWrite! Access, and then RegistrySetValue is called.
  1722.  
  1723.  
  1724.  
  1725. Parameters
  1726.  
  1727. Hkey: numeric or enumeration    The registry key of which to set a value. This is the key that was returned from RegistryOpenKey or RegistryCreateKey. See the RefistryOpenKey command for a list of error enumerations.
  1728.  
  1729. ClassesRoot! The HKEY_CLASSES_ROOT.
  1730.  
  1731. CurrentUser! The HKEY_CURRENT_USER.
  1732.  
  1733. LocalMachine! The HKEY_LOCAL_MACHINE.
  1734.  
  1735. Users! The HKEY_USERS.
  1736.  
  1737. PerformanceData! The HKEY_PERFORMANCE_DATA.
  1738.  
  1739. CurrentConfig! The HKEY_CURRENT_CONFIG.
  1740.  
  1741. DynData! the HKEY_DYN_DATA.
  1742.  
  1743. Value: string [optional]    The name of the value that is set. If missing or "", the default value of the key is set.
  1744.  
  1745. Data: any    
  1746.  
  1747. Type: enumeration    Binary! Free-form binary.
  1748.  
  1749. DWord! 32-bit number.
  1750.  
  1751. String! Null-terminated string.
  1752.  
  1753. ExpandableString! Null-terminated string with environment variable references.
  1754.  
  1755. PFBinary! Free-form binary.
  1756.  
  1757. PFDWord! 32-bit number.
  1758.  
  1759. PFString! Null-terminated string.
  1760.  
  1761. PFExpandableString!
  1762.  
  1763. PFWPString! WordPerfect word string.
  1764.  
  1765. PFByte! 8-bit number.
  1766.  
  1767. PFWord! 16-bit number.
  1768.  
  1769. PFBool! Boolean.
  1770.  
  1771. PFLogical!
  1772.  
  1773. Note
  1774.  
  1775.   This command is not available for use on a Linux operating system.
  1776.   
  1777. boolean := RenameDirectory
  1778.  
  1779. Example
  1780.  
  1781. Syntax
  1782.  
  1783. (OldDirectoryName: string; NewDirectoryName: string; [Prompts: enumeration])
  1784.  
  1785. Description
  1786.  
  1787. Rename a directory.
  1788.  
  1789. Return Value
  1790.  
  1791. Return True if successful, False if not.
  1792.  
  1793. Parameters
  1794.  
  1795. OldDirectoryName: string    Include the full path.
  1796.  
  1797. NewDirectoryName: string    Include the full path.
  1798.  
  1799. Prompts: enumeration (optional)    Default: NoPrompts!
  1800.  
  1801. NoPrompts!
  1802.  
  1803. Prompts! Prompt if the directory does not exist.
  1804.  
  1805. boolean := RenameFile
  1806.  
  1807. Example
  1808.  
  1809. Syntax
  1810.  
  1811. (OldFilename: string; NewFilename: string; [Prompts: enumeration])
  1812.  
  1813. Description
  1814.  
  1815. Rename and/or move a file.
  1816.  
  1817. Return Value
  1818.  
  1819. Return True if successful, False if not.
  1820.  
  1821. Parameters
  1822.  
  1823. OldFilename: string    Include the full path.
  1824.  
  1825. NewFilename: string    Include the full path.
  1826.  
  1827. Prompts: enumeration (optional)    Default: NoPrompts!
  1828.  
  1829. NoPrompts!
  1830.  
  1831. Prompts! Prompt if the old file does not exist, or the path is incorrect.
  1832.  
  1833. Repeat
  1834.  
  1835. Example
  1836.  
  1837. Syntax
  1838.  
  1839. The general form of a Repeat statement is:
  1840.  
  1841. Repeat
  1842.  
  1843. ...statement block...
  1844.  
  1845. Until (<Test> boolean)
  1846.  
  1847. Description
  1848.  
  1849. A loop statement that executes until the expression at the bottom of the loop is true.
  1850.  
  1851. The loop executes at least once, because it is not tested until the bottom of the loop. When <Test> is true, the first statement after Until is executed.
  1852.  
  1853. Parameters
  1854.  
  1855. <Test> boolean    Evaluate to true or false.
  1856.  
  1857. You can use Return in the following ways:
  1858.  
  1859. Syntax 1
  1860.  
  1861. (<Condition> enumeration; [<Value> any])
  1862.  
  1863. Description 1
  1864.  
  1865. End Label, Function, and Procedure subroutines, or a macro (see Run), and then directs macro execution to the statement that follows the subroutine or macro's caller; or creates a Cancel, Error, or Not Found condition.
  1866.  
  1867. Return generally ends a Label statement called by statements such as Call or Case Call.
  1868.  
  1869. Call(StartMacro)
  1870.  
  1871. Call(QuitMacro)
  1872.  
  1873. Label(StartMacro)
  1874.  
  1875. ... statement block...
  1876.  
  1877. Return // directs macro execution to Call(QuitMacro)
  1878.  
  1879. Label(QuitMacro)
  1880.  
  1881. Quit
  1882.  
  1883. If there is no caller to return to, and the macro containing Return is nested (called by another macro), Return directs macro execution to the statement that follows the macro's caller (see Run). Return ends a macro if there is no caller to return to, and the macro containing the Return statement is not nested.
  1884.  
  1885. Parameters 1
  1886.  
  1887. <Condition> enumeration (optional)    Create a Cancel, Error, or Not Found condition (see Assert). <Condition> stops a macro unless preceded by OnCancel, OnError, or OnNotFound, which direct macro execution to a specified Label. <Condition> has no effect when preceded by Cancel(Off!), Error(Off!), or NotFound(Off!). The enumerations (return types) are:
  1888.  
  1889. CancelCondition! Stop a macro unless preceded by OnCancel.
  1890.  
  1891. ErrorCondition! Stop a macro unless preceded by OnError.
  1892.  
  1893. NotFoundCondition! Stop a macro unless preceded by OnNotFound.
  1894.  
  1895. <Value> any (optional)    Return the result of a function operation (see Function).
  1896.  
  1897. Syntax 2
  1898.  
  1899. ([<Value> any])
  1900.  
  1901. Description 2
  1902.  
  1903. End Label, Function, and Procedure subroutines, or a macro (see Run), and then directs macro execution to the statement that follows the subroutine or macro's caller.
  1904.  
  1905. Return generally ends a Label statement called by statements such as Call or Case Call.
  1906.  
  1907. Call(StartMacro)
  1908.  
  1909. Call(QuitMacro)
  1910.  
  1911. Label(StartMacro)
  1912.  
  1913. ... statement block...
  1914.  
  1915. Return // directs macro execution to Call(QuitMacro)
  1916.  
  1917. Label(QuitMacro)
  1918.  
  1919. Quit
  1920.  
  1921. If there is no caller to return to, and the macro containing Return is nested (called by another macro), Return directs macro execution to the statement that follows the macro's caller (see Run). Return ends a macro if there is no caller to return to, and the macro containing the Return statement is not nested.
  1922.  
  1923. Parameters 2
  1924.  
  1925. <Value> any (optional)    Return the result of a function operation (see Function).
  1926.  
  1927. Return
  1928.  
  1929. Example
  1930.  
  1931. Syntax
  1932.  
  1933. (<Condition> enumeration; [<Value> any])
  1934.  
  1935. Description
  1936.  
  1937. End Label, Function, and Procedure subroutines, or a macro (see Run), and then directs macro execution to the statement that follows the subroutine or macro's caller; or creates a Cancel, Error, or Not Found condition.
  1938.  
  1939. Return generally ends a Label statement called by statements such as Call or Case Call.
  1940.  
  1941. Call(StartMacro)
  1942.  
  1943. Call(QuitMacro)
  1944.  
  1945. Label(StartMacro)
  1946.  
  1947. ... statement block...
  1948.  
  1949. Return // directs macro execution to Call(QuitMacro)
  1950.  
  1951. Label(QuitMacro)
  1952.  
  1953. Quit
  1954.  
  1955. If there is no caller to return to, and the macro containing Return is nested (called by another macro), Return directs macro execution to the statement that follows the macro's caller (see Run). Return ends a macro if there is no caller to return to, and the macro containing the Return statement is not nested.
  1956.  
  1957. Parameters
  1958.  
  1959. <Condition> enumeration (optional)    Create a Cancel, Error, or Not Found condition (see Assert). <Condition> stops a macro unless preceded by OnCancel, OnError, or OnNotFound, which direct macro execution to a specified Label. <Condition> has no effect when preceded by Cancel(Off!), Error(Off!), or NotFound(Off!). The enumerations (return types) are:
  1960.  
  1961. CancelCondition! Stop a macro unless preceded by OnCancel.
  1962.  
  1963. ErrorCondition! Stop a macro unless preceded by OnError.
  1964.  
  1965. NotFoundCondition! Stop a macro unless preceded by OnNotFound.
  1966.  
  1967. <Value> any (optional)    Return the result of a function operation (see Function).
  1968.  
  1969. Return
  1970.  
  1971. Syntax
  1972.  
  1973. ([<Value> any])
  1974.  
  1975. Description
  1976.  
  1977. End Label, Function, and Procedure subroutines, or a macro (see Run), and then directs macro execution to the statement that follows the subroutine or macro's caller.
  1978.  
  1979. Return generally ends a Label statement called by statements such as Call or Case Call.
  1980.  
  1981. Call(StartMacro)
  1982.  
  1983. Call(QuitMacro)
  1984.  
  1985. Label(StartMacro)
  1986.  
  1987. ... statement block...
  1988.  
  1989. Return // directs macro execution to Call(QuitMacro)
  1990.  
  1991. Label(QuitMacro)
  1992.  
  1993. Quit
  1994.  
  1995. If there is no caller to return to, and the macro containing Return is nested (called by another macro), Return directs macro execution to the statement that follows the macro's caller (see Run). Return ends a macro if there is no caller to return to, and the macro containing the Return statement is not nested.
  1996.  
  1997. Parameters
  1998.  
  1999. <Value> any (optional)    Return the result of a function operation (see Function).
  2000.  
  2001. numeric or measurement := RoundOff
  2002.  
  2003. Syntax
  2004.  
  2005. (Value: numeric or measurement; [RoundTo: numeric or measurement])
  2006.  
  2007. Description
  2008.  
  2009. Get a value rounded to a value.
  2010.  
  2011. Example
  2012.  
  2013. vResult := RoundOff(12.63; 0.75)
  2014.  
  2015. Result: vResult equals 12.75
  2016.  
  2017. Return Value
  2018.  
  2019. Rounded value.
  2020.  
  2021. Parameters
  2022.  
  2023. Value: numeric or measurement    The value to round off.
  2024.  
  2025. RoundTo: numeric or measurement (optional)    The round value to the nearest multiple of this number. Default: 1.0
  2026.  
  2027. Run
  2028.  
  2029. Example
  2030.  
  2031. Syntax
  2032.  
  2033. (MacroFile: string; {[Parameter: any]})
  2034.  
  2035. Description
  2036.  
  2037. Call (start) a nested macro.
  2038.  
  2039. A nested macro starts immediately when it is called. When a nested macro ends, control returns to the calling macro. If Quit ends a nested macro, control does not return to the calling macro.
  2040.  
  2041. PerfectScript automatically compiles uncompiled Run macros. Macro execution stops if the macro will not compile.
  2042.  
  2043. Parameters
  2044.  
  2045. MacroFile: string    The path and filename of a compiled macro.
  2046.  
  2047. {Parameter: any} (optional)    Enclose multiple parameters in braces ({ }), separated by a semicolon. For example: Run ("macro"; {"a"; "b"; "c"}). Parameter values are passed to a special array variable named MacroArgs.
  2048.  
  2049. If missing, MacroArgs[ ] is not defined in the new macro.
  2050.  
  2051.  
  2052.  
  2053.  
  2054.  
  2055.  
  2056.