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

  1. value := MacroArgs [<Index> numeric]
  2.  
  3. Description
  4.  
  5. An array variable that contains parameter arguments passed to it by Chain, Nest, or Run, or on the command line with the /m- option.
  6.  
  7. Example
  8.  
  9. // Macro: MAIN.WCM
  10.  
  11. // Include the full path if the macro is not in the default
  12.  
  13. // macros directory
  14.  
  15. RUN
  16.  
  17. ("TSTMACRO"; {"x"; "y"; "z"})
  18.  
  19.  
  20.  
  21. // Macro: TSTMACRO.WCM
  22.  
  23. // Compile, then play MAIN.WCM
  24.  
  25. vElements := DIMENSIONS(MacroArgs[ ]; 0)
  26.  
  27. IF(vElements != 0)
  28.  
  29. FORNEXT(x; 1; vElements; 1)
  30.  
  31. MESSAGEBOX(z; "Element Values"; "MacroArgs[" + x + "] = " + MacroArgs[x])
  32.  
  33. ENDFOR
  34.  
  35. ELSE
  36.  
  37. BEEP
  38.  
  39. MESSAGEBOX(z; "Error"; "No values passed"; IconExclamation!)
  40.  
  41. ENDIF
  42.  
  43. Result: x y z
  44.  
  45. numeric or enumeration := MacroCompile
  46.  
  47. Example
  48.  
  49. Syntax
  50.  
  51. (MacroFileName: string; [Options: enumeration])
  52.  
  53. Description
  54.  
  55. Compile the specified macro file. If the specified macro file does not exist, a NotFound condition is asserted. Otherwise, MacroCompile returns a success indicator.
  56.  
  57. Return Value
  58.  
  59. The enumeration value of Success! if the macro compilation is successful; otherwise the line number and character position within the line of the last syntax error is returned. The line number is stored in the loword of the return value. The character position is stored in the hiword of the return value. These values may be extracted using the following macro code:
  60.  
  61. x := MacroCompile (file)
  62.  
  63. vLinenumber := x & 0ffffx
  64.  
  65. vCharPosition := x >> 16
  66.  
  67.  
  68.  
  69. Success! The macro play was successful.
  70.  
  71. Parameters
  72.  
  73. MacroFileName: string    The name of the macro file to compile.
  74.  
  75. Options: enumeration (optional)    Determines how the macro is compiled. If missing, Wait! is used.
  76.  
  77. Wait! Wait for the compile to complete. If Wait! or DontWait! is not specified, Wait! is used.
  78.  
  79. DontWait! Do not wait for the compile to finish. If Wait! or DontWait! is not specified, Wait! is used.
  80.  
  81. Debug! Compile the macro for debugging. This is the same as choosing the File/Debug/Compile menu item in Macro Facility.
  82.  
  83. NoPrompts! Do not display or wait for prompts or dialogs from the macro compiler. Compiler prompts and dialogs are automatically dismissed with the default option for that prompt or dialog. For the syntax error dialog, the default action for syntax warnings is to continue the compile. The default action for syntax errors and fatal errors is to cancel the compile.
  84.  
  85. ShowProgress! Display the compile progress and compilation summary dialogs during the compile. If NoPrompts! is specified, the summary dialog is automatically dismissed.
  86.  
  87. GenerateListing! Generate a compiler listing file. If NoPrompts! is specified, prompts that specify the listing file name to overwrite an existing listing file are automatically dismissed. This causes the listing file to overwrite any file by the same name.
  88.  
  89. ForceRecompile! Recompile the macro even if the macro is already compiled. If NoPrompts! is specified, the prompt to overwrite the up-to-date macro object is automatically dismissed. This causes the macro to be recompiled and to overwrite the macro object if it was already up to date.
  90.  
  91. ShowIcon! Show an icon in the Windows system tray area while this macro is being compiled. This option only has an effect if the PerfectScript setting "Show Tray Icons" is turned off, since a tray icon is normally always displayed. If turned off, tray icons are not displayed, and this options causes the icon to display.
  92.  
  93. string := MacroDialogResult
  94.  
  95. Description
  96.  
  97. MacroDialogResult is a predefined macro variable that is updated to reflect the status of the Dialog commands. These commands are functions that mostly return the same value placed into MacroDialogResult. The list of commands below are followed by the values placed into MacroDialogResult if successful or if not successful.
  98.  
  99. Command Name: successful / not successful
  100.  
  101. DialogDefine: dialog name / empty string ("")
  102.  
  103. DialogDestroy: True / False
  104.  
  105. DialogShow (callback dialog): dialog handle / 0
  106.  
  107. DialogShow (non-callback): control name / empty string ("") The return value for this command is different when the control is the OK or Cancel control. MacroDialogResult returns "1" for OK, and "2" for Cancel. This command returns "OKBttn" and "CancelBttn".
  108.  
  109. DialogDisplay: True / False
  110.  
  111. DialogDismiss: control name / empty string ("") See the description of the non-callback DialogShow command above.
  112.  
  113. DialogUndisplay: True / False
  114.  
  115. DialogHandle: dialog handle / 0
  116.  
  117. DialogLoad: dialog handle / 0
  118.  
  119. DialogSave: True / False
  120.  
  121. DialogDelete: True / False
  122.  
  123. DoesDialogExist: True / False
  124.  
  125. DialogSetProperties: True/ False
  126.  
  127. DialogControlUpdate: True/ False
  128.  
  129. DialogControlQuery: True / False
  130.  
  131. DialogAddListItem: item index / -1
  132.  
  133. All the following commands return the control name if successful, an empty string ("") if not:
  134.  
  135. DialogAddBitmap
  136.  
  137. DialogAddCheckBox
  138.  
  139. DialogAddColorWheel
  140.  
  141. DialogAddComboBox
  142.  
  143. DialogAddControl
  144.  
  145. DialogAddCounter
  146.  
  147. DialogAddDate
  148.  
  149. DialogAddEditBox
  150.  
  151. DialogAddFileNameBox
  152.  
  153. DialogAddFrame
  154.  
  155. DialogAddGroupBox
  156.  
  157. DialogAddHLine
  158.  
  159. DialogAddHotSpot
  160.  
  161. DialogAddIcon
  162.  
  163. DialogAddListBox
  164.  
  165. DialogAddPopupButton
  166.  
  167. DialogAddProgress
  168.  
  169. DialogAddPushButton
  170.  
  171. DialogAddRadioButton
  172.  
  173. DialogAddScrollBar
  174.  
  175. DialogAddText
  176.  
  177. DialogAddViewer
  178.  
  179. DialogAddVLine
  180.  
  181. numeric or string := MacroInfo
  182.  
  183. Example
  184.  
  185. Syntax
  186.  
  187. (InfoItem: enumeration; [CallLevel: enumeration or numeric]; {[ItemData: any]})
  188.  
  189. Description
  190.  
  191. Return information about the system, the state of a macro, or a label or routine within a macro.
  192.  
  193. Discussion
  194.  
  195. The macro system keeps track of called labels and routines, the data that is specific to each one, and the call depth of each one. If the main section of a macro calls label "A" which calls procedure "B" which calls function "C," the following is true:
  196.  
  197. Call depth is 2 (call depth is 0 when the macro starts), and the data for A, B, and C is maintained by the macro system. The current label/routine is C. If data for C is needed, specify CallLevel as Current!. If data for B is needed, specify CallLevel as Previous! (B was the routine that called C). If data for A is needed, specify CallLevel as Previous! + 1. Whenever data is needed for a routine before Previous!, specify CallLevel as Previous! + 1, Previous + 2, and so forth.
  198.  
  199. You may also specify a numeric value for CallLevel parameters, which simplifies getting data on all active label or routine calls using a For loop. For example, specify Current! as 0, Previous! as 1, the label or routine before Previous! as 3, and so forth. Start the loop at 0, and use MacroInfo (CallDepth!) to end the loop at the call depth return value.
  200.  
  201. Return Value
  202.  
  203. string if the platform name is requested, or numeric if the platform version is requested. Some InfoItem values now return an enumeration. The return value for the MacroArgs! And ChainFileArgs! InfoItems can now be an empty array. 
  204.  
  205. Parameters
  206.  
  207. InfoItem: enumeration    Specify an InfoItem (the data type returned is in italics). See the following table for details.
  208.  
  209. DLLCallBufferSize!
  210.  
  211. numeric    Returns the minimum size of the buffer used when passing string variables by address to DLLCalls. The actual size is the larger of this size, and the current size of the string in the variable being passed by address.
  212.  
  213. VarErrChkOn!
  214.  
  215. Boolean    Returns the enabled status of the VarErrChk.
  216.  
  217. VarErrChkSetup!
  218.  
  219. Boolean    Returns True of a label has been established for undefined variable access errors by the OnVarErrChk an OnVarErrChkCall commands.
  220.  
  221. VarErrChkCall!
  222.  
  223. Boolean    Returns True if a label has been established for undefined variable access errors by the OnVarErrChk command, and False if a label has been established for undefined variable access errors by the OnVarErrChk command.
  224.  
  225. TokenError!
  226.  
  227. enumeration    Returns the token handler return stutus value from the last token handler to be called, both internal and external. Possible values are:
  228.  
  229. TokenOK! Formerly value 0. No error.
  230.  
  231. UnknownToken! Fomerly value -99. No such token.
  232.  
  233. NotFoundCondition! Formerly value -98. NotFound condition occurred.
  234.  
  235. CancelCondition! Formerly value -97. Cancel condition occurred.
  236.  
  237. ErrorCondition! Formerly value -96. Error condition occurred.
  238.  
  239. InvalidParameter! Formerly value -95. Invalid parameter.
  240.  
  241. TokenInvalid! Formerly value -94. Token invalid at this time.
  242.  
  243. NotHandled! Formerly value -93. Token wasn't handled.
  244.  
  245. DefaultUnits!
  246.  
  247. enumeration    Returns the same value as DefaultUnits command, the current default units type. Possible values are:
  248.  
  249. None! Formerly value 0.
  250.  
  251. Centimeters! Formerly value 1.
  252.  
  253. Inches! Formerly value 2.
  254.  
  255. Millimeters! Formerly value 3.
  256.  
  257. Points! Formerly value 4.
  258.  
  259. WPUnits! Formerly value 5.
  260.  
  261. CallLevel: enumeration or numeric (optional)    Used by some InfoItem types; specifies the label or routine call data is requested for. See Discussion above. Default: Current!
  262.  
  263. Current!
  264.  
  265. Previous!
  266.  
  267. ItemData: any (optional/repeating)    Used by some InfoItem types; specifies additional data needed by the specified item. For example, UserDefinedCondition types require the user-defined condition number for which to return information. See OnCondition for specifying a user-defined condition number.
  268.  
  269. Time Information
  270.  
  271. ResetTime! Can be used with the Time...! InfoItem values to reset the specified interval timer to zero. (It cannot be used with the TimeWindowsStarted! or TimeWindowsElapsed! Values.)
  272.  
  273.     
  274.  
  275.  
  276.  
  277. Information Type    Return Value
  278.  
  279. System Information    ComputerName! string Name assigned to the computer.
  280.  
  281. UserName! string Name of currently logged-in user.
  282.  
  283. WindowsDirectory! string Windows directory path.
  284.  
  285. SystemDirectory! string Windows System directory path.
  286.  
  287. PlatformName! string Name of the current platform. Currently the platform names that are returned are:
  288.  
  289.  "Win32s" for Windows 3.1 with Win32s
  290.  
  291.  "Win95" for Windows 95
  292.  
  293.  "Win98" for Windows 98
  294.  
  295.  "WinNT" for Windows NT
  296.  
  297. ."Win2000" for Windows 2000
  298.  
  299. ."Win32??" for unrecognized version of Windows 32
  300.  
  301. ."WinNT??" for unrecognized version of Windows NT
  302.  
  303. ."CorelWine" for Corel Linux version
  304.  
  305. PlatformVersion! numeric Version of the platform.
  306.  
  307. PlatformVersionString! string Version of the platform.
  308.  
  309. PerfectFitVersion! numeric Version of PerfectFit.
  310.  
  311. PerfectFitVersionString! string Version of PerfectFit.
  312.  
  313. PerfectScriptVersion! numeric Version of PerfectScript.
  314.  
  315. PerfectScriptVersionString! string Version of PerfectScript.
  316.  
  317. PerfectScriptLanguageCode! string Language code of PerfectScript.
  318.  
  319. PerfectScriptLanguageName! string Language name of PerfectScript.
  320.  
  321. SpeedDelay! (Numeric) Return the current delay set by the speed command.
  322.  
  323. Macro Information    DialogsExist! boolean Do macro dialogs exist.
  324.  
  325. BreakpointsExist! boolean Do macro break points exist.
  326.  
  327. ErrorNumber! Returns the same value as the ErrorNumber command. It returns the following values:
  328.  
  329. Success! Formerly value 0. There was no error.
  330.  
  331. CancelConditionAsserted! Formerly value 1. A Cancel condition was asserted.
  332.  
  333. ErrorConditionAsserted! Formerly value 2. An Error condition was asserted.
  334.  
  335. NotFoundConditionAsserted! Formerly value 7. A Not Found condition was asserted.
  336.  
  337. UserDefinedCondition! Formerly value 100. The value defines the base value for assertions of user defined conditions. See the Assert command for more information about the value of user defined condition codes.
  338.  
  339. VarErrChkAsserted! A VarErrChk condition was asserted. This occurs when a unhandled access to an undefined variable occurs.
  340.  
  341. ErrorText! string Additional error text associated with the last error.
  342.  
  343. TokenError!enumeration Returns the token handler return status from the last token handler to be called.
  344.  
  345. AbortingTokenName! string Name of the product command token (if any) that caused the last error.
  346.  
  347. MacroDialogResult! any Same as MacroDialogResult.
  348.  
  349. MacroArgs! array The array of argueents passed to the macro on startup.
  350.  
  351. CallDepth! numeric The current call depth: 0 = main.
  352.  
  353. Label or Routine Information    InRoutine! boolean Are you in a routine (or label).
  354.  
  355. InCallback! boolean Is this a callback.
  356.  
  357. InAssert! boolean Is this an Assert call.
  358.  
  359. FileName! string File the routine is in.
  360.  
  361. LineNumber! numeric Source line number.
  362.  
  363. LabelOrRoutineName! label Label or routine name.
  364.  
  365. SourceLine! string Source line if available for the specified CallLevel (source is available for macros compiled with debug).
  366.  
  367. ChainFileName! string Name of any Chain file.
  368.  
  369. ChainFileArgs! array Arguments to any Chain file, if the Chain macro is setup.
  370.  
  371. DefaultUnits! Returns the same value as the DefaultUnits command.
  372.  
  373. PersistAllOn! boolean State of PersistAll.
  374.  
  375. VarErrChkOn! boolean State of VarErrChkOn.
  376.  
  377. CancelOn! boolean State of Cancel condition.
  378.  
  379. CancelSetup! boolean Does Cancel condition have an associated label.
  380.  
  381. CancelCall! boolean Will Cancel call or goto an associated label.
  382.  
  383. CancelHandler! label Label of the cancel handler.
  384.  
  385. ExitOn! Return the exit handler state. Equivalent to ExitHandlerState() = ExitHandlerState.On!
  386.  
  387. ExitSetup! Return whether an exit hanlder has been established. Equivalent to the statement OnExit() != ""
  388.  
  389. ExitCall! Return True if an exit handler has been established.
  390.  
  391. ExitHandler! Return the label of the established exit handler. Equivalent to OnExit()
  392.  
  393. ErrorOn! boolean State of Error condition.
  394.  
  395. ErrorSetup! boolean Does Error condition have an associated label.
  396.  
  397. ErrorCall! boolean Will Error call or goto an associated label.
  398.  
  399. ErrorHandler! label Label of the error handler.
  400.  
  401. NotFoundOn! boolean State of NotFound condition.
  402.  
  403. NotFoundSetup! boolean Does NotFound condition have an associated label.
  404.  
  405. NotFoundCall! boolean Will NotFound call or goto an associated label.
  406.  
  407. NotFoundHandler! label Label of the NotFound handler.
  408.  
  409. VarErrChkOn! boolean Returns whether VarErrChk is currently enabled.
  410.  
  411. VarErrChkSetup! boolean Returns True is a label has been established for undefined variable access errors by the OnVarErrChk and OnVarErrChk Call commands.
  412.  
  413. VarErrChkCall! boolean Returns True is a label has been established for undefined variable access errors by the OnVarErrChk Call command and False if a label has been established for undefined variable access errors by the OnVarErrChk command.
  414.  
  415. VarErrChkHandler!label Returns the label to be called or jumped to if an undefined variable is accessed.
  416.  
  417. UserDefinedConditonOn! Boolean Is a user-defined condition on.
  418.  
  419. UserDefinedConditionSetup! Boolean Does a user-defined condition have an associated label.
  420.  
  421. UserDefinedConditionCall! Boolean Will UserDefinedCondition call or goto an associated label.
  422.  
  423. UserDefinedConditionHandler! label Label of the UserDefined condition.
  424.  
  425. Time Information    The time commands may be used to examine and extract field from the return value.
  426.  
  427. TimeWindowsStarted! numeric Returns the starting time of the current Windows session.
  428.  
  429. TimeWindowsElapsed! numeric Returns the elapsed time of the current Windows session.
  430.  
  431. TimeMacroStarted! numeric Returns the starting time of the current running macro.
  432.  
  433. TimeMacroElapsed! numeric Returns the elapsed time of the current running macro.
  434.  
  435. TimeElapsedNet! numeric Returns the elapsed time the current macro has spent in the macro system (TimeElapsed!- TimeInProductCalls!-TimeInDLLCalls!- TimeInOleOjects!).
  436.  
  437. TimeInProductCalls! numeric Returns the elapsed time the running macro has spent in calls to product commands of other Corel applications.
  438.  
  439. TimeInDLLCalls! numeric Returns the elapsed time the current macro has spent in calls to DLL routines.
  440.  
  441. TimeInOleOjects! numeric Returns the elapsed time the current macro has spent in calls to OLE automation objects.
  442.  
  443. DLLCallBufferSize! numeric Returns the minimum size of the buffer used when passing string variables by address to DLLCalls.
  444.  
  445. numeric := MacroIsCompiled
  446.  
  447. Example
  448.  
  449. Syntax
  450.  
  451. (MacroFileName: string)
  452.  
  453. Description
  454.  
  455. Determine if a specified macro file is compiled. If the specified macro file does not exist, a NotFound condition is asserted. Otherwise, MacroIsCompiled returns the compiled status of the macro file.
  456.  
  457. Return Value
  458.  
  459. True if the macro is compiled and up to date, False if not.
  460.  
  461. Parameters
  462.  
  463. MacroFileName: string    The name of a macro file.
  464.  
  465. boolean := MacroPlay
  466.  
  467. Example
  468.  
  469. Syntax
  470.  
  471. (MacroFileName: string; [Options: enumeration]; [{Parameter: any}])
  472.  
  473. Description
  474.  
  475. Play the specified macro file. The macro runs as a completely independent macro in parallel with the current macro. If the specified macro file does not exist, a NotFound condition is asserted. Otherwise MacroPlay returns a success indicator.
  476.  
  477. Return Value
  478.  
  479. The enumeration value of Success! if the macro compilation is successful, or the line number where the macro terminated with an error if the macro compilation is not successful.
  480.  
  481. Success! The macro play was successful.
  482.  
  483. Parameters
  484.  
  485. MacroFileName: string    The name of the macro file to play.
  486.  
  487. Options: enumeration (optional)    Determine how the macro is played. If missing, Wait! is used.
  488.  
  489. Wait! Wait for the play to complete. If Wait! or DontWait! is not specified, Wait! is used.
  490.  
  491. DontWait! Do not wait for the play to finish. If Wait! or DontWait! is not specified, Wait! is used.
  492.  
  493. Debug! Play the macro with the macro debugger. This is the same as choosing the File/Debug/Play menu item in the Macro Facility.
  494.  
  495. ShowIcon! Show an icon in the Windows system tray area while the macro is being played. This option only has an effect if the PerfectSript setting "Show Tracey Icons" is turned off, since a tray icon is normally displayed by default.
  496.  
  497. Parameter: any (optional, repeating)    Values passed to the macro in the MacroArgs[ ] array variable.
  498.  
  499. numeric := MantissaPart
  500.  
  501. Syntax
  502.  
  503. (Value: numeric)
  504.  
  505. Description
  506.  
  507. Get the mantissa portion of a numeric value.
  508.  
  509. Example
  510.  
  511. vMntsa := MantissaPart(3.2e18)
  512.  
  513. Result: vMntsa = 3.2
  514.  
  515. Return Value
  516.  
  517. Mantissa portion of a numeric value.
  518.  
  519. Parameters
  520.  
  521. Value: numeric    A fractional number (return the mantissa part of).
  522.  
  523. numeric := MaxN
  524.  
  525. Syntax
  526.  
  527. ([Nth: numeric]; [Value: numeric])
  528.  
  529. Description
  530.  
  531. This command returns the Nth largest value in a list of values.
  532.  
  533. Return Value
  534.  
  535. The Nth largest value.
  536.  
  537. Parameters
  538.  
  539. Nth:
  540.  
  541. numeric    Which largest value to return. If 1 is passed, the largest value is returned. If the list has 10 values, then the 10th largest value is the smallest value.
  542.  
  543. Value: numeric    The list of data values to return the Nth largest value of.
  544.  
  545. numeric := Max
  546.  
  547. Syntax
  548.  
  549. ({Value: numeric})
  550.  
  551. Description
  552.  
  553. Get the maximum value of a list of values.
  554.  
  555. Example
  556.  
  557. x=Max (4;8;-2;32)
  558.  
  559. MessageBox (Caption:"Example"; Message:"Max (4;8;-2;32) = "+ x; Style:OK!)
  560.  
  561. Return Value
  562.  
  563. Maximum value of a list of values.
  564.  
  565. Parameters
  566.  
  567. Value: numeric    The list of values. Separate multiple values with a semicolon.
  568.  
  569. Menu
  570.  
  571. Example
  572.  
  573. Syntax
  574.  
  575. (<MenuPick> variable; <MnemonicType> enumeration; [<HorizontalPosition> numeric]; [<VerticalPosition> numeric]; {<MenuChoice> string})
  576.  
  577. Description
  578.  
  579. Display a menu of user-defined items. The parent of this dialog is maintained by the macro and is initially set to the application that started the macro. The dialog may be attached to a different application or window by setting a new default parent with the SetDefaultParent command.
  580.  
  581. Menu is used with statements such as Case, Case Call, and If to execute a statement that corresponds to a selected menu item. To dismiss a menu, press Alt or Esc.
  582.  
  583. Return Value
  584.  
  585. Returns the index number of th item that was selected, starting at 1. A value of 0 is returned if there is an error or if the menu was cancelled.
  586.  
  587. Parameters
  588.  
  589. <MenuPick> variable    A number is returned in this variable whether numbers or letters are used to reference menu items (see the MenuType parameter). For numbers, the range is 1 to 9. For letters, the range is 1 to 26. A returns 1, B returns 2, and so forth. 0 is returned if Alt or Esc is pressed.
  590.  
  591. <MnemonicType> enumeration
  592.  
  593. (optional)    Determine whether a letter or number is displayed to the left of a menu item. If missing, Either! Is used. For Letters! And Digits!, the character just after "&" will be used as the accelerator (the & is them removed). All excess "&" characters are removed from the menu item strings.
  594.  
  595. Digit! Numbers (1-9)
  596.  
  597. Letters! Alphabetic characters (A-Z)
  598.  
  599. Either! If there are more than 9 menu items, the items are given mnemonics of letters, otherwise they are given mnemonics of digits.
  600.  
  601. <HorizontalPosition> numeric (optional)    The number of pixels from the left side of the main window to the left side of the menu. To center the menu horizontally, leave this parameter blank.
  602.  
  603. <VerticalPosition> numeric (optional)    The number of pixels from the top of the main window to the top of the menu. To center the menu vertically, leave this parameter blank.
  604.  
  605. {<MenuChoice> string}    The menu item text. You may list up to 9 menu items referenced by numbers, or up to 26 referenced by letters. Enclose menu items in braces ({ }) separated by a semicolon.
  606.  
  607. Menu(vSelection; Letter!; 50; 50; {"Option 1"; "Option 2"; "Option 3"})
  608.  
  609. To select an item: click it, select it with Tab and press Enter, or press the corresponding letter or number.
  610.  
  611. A horizontal separator can be created by a menu choice with the text string of "--" or "_____" (5 characters). 
  612.  
  613. enumeration := MessageBox
  614.  
  615. Example
  616.  
  617. Syntax
  618.  
  619. ([Status: variable]; [Caption: string]; Message: string; [Style: enumeration]; {[ParameterData: string]})
  620.  
  621. Description
  622.  
  623. Display a message box. The parent of this dialog is maintained by the macro and is initially set to the application that started the macro. The dialog may be attached to a different application or window by setting a new default parent with the SetDefaultParent command.
  624.  
  625. Provide a limited set of buttons and icons, and an option to include up to 10 different parameter strings in the message.
  626.  
  627. Return Value
  628.  
  629. The control value of the button that dismisses the message box is returned in this variable. The return button values are:
  630.  
  631. Error!
  632.  
  633. OKButton!
  634.  
  635. CancelButton!
  636.  
  637. AbortButton!
  638.  
  639. RetryButton!
  640.  
  641. IgnoreButton!
  642.  
  643. YesButton!
  644.  
  645. NoButton!
  646.  
  647. If there is not enough memory to create the message box, 0 is returned.
  648.  
  649. Parameters
  650.  
  651. Status: variable (optional)    The control value of the button that dismisses the message box (see Return Value above).
  652.  
  653. Caption: string (optional)    The title bar text. Default: "PerfectScript"
  654.  
  655. Message: string    The message box text. Icons appear to the left of the message. Control buttons are centered below the message. If HasParameters! style is used, a caret (^) followed by a number inserts the corresponding ParameterData message in its place (see the ParameterData parameter below). Use two carets (^^) to insert a caret as part of the message string. Use NToC(0F90Ah) to insert a hard return code in the message string. For example,
  656.  
  657. MessageBox(vAns; "Title"; "First line" + NToC(0F90Ah) + "Second line"; IconInformation!)
  658.  
  659. creates two lines above the control button. The next example creates three lines, including one blank line:
  660.  
  661. HdReturn = NToC(0F90Ah)
  662.  
  663. MessageBox(vAns; "Title"; "First line" + HdReturn + HdReturn + "Second line"; IconInformation!)
  664.  
  665. Style: enumeration (optional)    The message box styles. Type | between enumerations to combine styles. Select only one style from each group
  666.  
  667. Default: OK! | IconNone! | DefButton1! See the table below for more details about enumerations.
  668.  
  669. {ParameterData: string} (optional)    The text for the Message parameter (numbering begins with 0). Up to 10 parameters separated by semicolons are allowed. For example,
  670.  
  671. v0 := "Yes to continue, or"
  672.  
  673. v1 := "No to quit."
  674.  
  675. MessageBox(x; "Title"; "Select ^0 ^1"; YesNo! | IconStop! | HasParameters!; {v0; v1})
  676.  
  677. fills the Message parameter with "Select Yes to continue, or No to quit." If HasParameters! is not used, Message contains "Select ^0 ^1".
  678.  
  679. If not specified, no parameters are substituted into Message.
  680.  
  681.  
  682.  
  683. Type of Enumerations    Enumerations
  684.  
  685. Button enumerations are:    AbortRetryIgnore! (Abort, Retry, and Ignore)
  686.  
  687. OK! (OK - default if no button is specified)
  688.  
  689. OKCancel! (OK and Cancel)
  690.  
  691. RetryCancel! (Retry and Cancel)
  692.  
  693. YesNo! (Yes and No)
  694.  
  695. YesNoCancel! (Yes, No, and Cancel)
  696.  
  697. Icon enumerations are:    IconNone! (No icon (default if no icon is specified))
  698.  
  699. IconAsterisk! (Lowercase "i" in a blue circle)
  700.  
  701. IconExclamation! (Exclamation point in a yellow circle)
  702.  
  703. IconHand! (Stop sign in a red circle)
  704.  
  705. IconInformation! (Lowercase "i" in a blue circle)
  706.  
  707. IconWarning! (Exclamation point in a yellow circle)
  708.  
  709. IconError! (Stop sign in a red circle)
  710.  
  711. IconQuestion! (Question mark in a green circle)
  712.  
  713. IconStop! (Stop sign in a red circle)
  714.  
  715. Default button enumerations are:    DefButton1!
  716.  
  717. DefButton2!
  718.  
  719. DefButton3!
  720.  
  721. Modality enumerations are:    ApplicationModal! (You can switch to another application, but you must dismiss the message box (click a control button) before the macro resumes. ApplicationModal! is the default if either SystemModal! or TaskModal! is not specified.)
  722.  
  723. SystemModal! (You must dismiss the message box before the macro resumes, and before you can switch to another application.)
  724.  
  725. TaskModal! (You can switch to another application, but you must dismiss the message box (click a control button) before the macro resumes.)
  726.  
  727. Miscellaneous enumerations are:    Beep! (Beep when the message box is displayed.)
  728.  
  729. HasParameters! (Notifies MessageBox box that a caret (^) followed by a number in the Message parameter is to be replaced by the corresponding character string in the ParameterData parameter.)
  730.  
  731. numeric := MeanDev
  732.  
  733. Syntax
  734.  
  735. ([Type: enumeration]; [Value: numeric])
  736.  
  737. Description
  738.  
  739. This comand computes the statistical mean deviation of a list of data values.
  740.  
  741. Return Value
  742.  
  743. The mean deviation of the data.
  744.  
  745. Parameters
  746.  
  747. Type:
  748.  
  749. enumeration    Whether the list of data values represents the entire population of data values, or just a sample of the data values. If missing, Population! is used.
  750.  
  751. Population! The list of data values is the entire set of data values.
  752.  
  753. Sample! The list of data values represents just a sample of the entire set of values.
  754.  
  755. Value: numeric    The list of data values to compute the mean deviation for.
  756.  
  757. numeric := Min
  758.  
  759. Syntax
  760.  
  761. ({Value: numeric})
  762.  
  763. Description
  764.  
  765. Get the minimum value of a list of values.
  766.  
  767. Return Value
  768.  
  769. Minimum value of a list of values.
  770.  
  771. Parameters
  772.  
  773. Value: numeric    The list of values. Separate multiple values with a semicolon.
  774.  
  775. numeric := Median
  776.  
  777. Syntax
  778.  
  779. ([Value: numeric])
  780.  
  781. Description
  782.  
  783. This command returns the median of a list of data values. The median is the value that is located at the halfway point between the largest and smallest values. If the number is even, then the average of the 2 middle values is returned.
  784.  
  785. Return Value
  786.  
  787. The median value of the data values.
  788.  
  789. Parameters
  790.  
  791. Value: numeric    The list of data values to return the median for.
  792.  
  793. numeric := MMPlay
  794.  
  795. Example
  796.  
  797. Syntax
  798.  
  799. (Filename: string; [Options: enumeration])
  800.  
  801. Description
  802.  
  803. Play a sound file.
  804.  
  805. Play a audio (WAV) file, an Audio-Visual Interleave (AVI) movie file, or a Musical Instrument Digital Interface (MIDI) file, or speaks an ASCII text file (see MMSpeak). Speech requires text-to-speech drivers like those shipped with some sound boards. Audio and MIDI files require the appropriate sound card.
  806.  
  807. Return Value
  808.  
  809. A handle that can be passed to MMStopPlay.
  810.  
  811. Parameters
  812.  
  813. Filename: string    The path and name of a sound file. The appropriate driver for each file type must be installed.
  814.  
  815. Options: enumeration (optional)    Default: DontWait!
  816.  
  817. DontWait! Start playing and go immediately to the next macro statement (has no effect on some systems).
  818.  
  819. Wait! Start playing and wait for play to finish before going to the next macro statement.
  820.  
  821. MMSpeak
  822.  
  823. Example
  824.  
  825. Syntax
  826.  
  827. (String: string)
  828.  
  829. Description
  830.  
  831. Speak an ASCII file or ASCII text.
  832.  
  833. Parameters
  834.  
  835. String: string    The path and name of an ASCII file, or a string, or a variable containing a string. A text-to-speech driver must be installed in the Windows 95 System directory. Products supported are: Lernout and Hauspie, Centigram TruVoice, and CreativeTextAssist (SoundBlaster).
  836.  
  837. MMSpeakClipboard
  838.  
  839. Example
  840.  
  841. Syntax
  842.  
  843. ()
  844.  
  845. Description
  846.  
  847. Speak text saved to the Clipboard.
  848.  
  849. A text-to-speech driver must be installed. Products supported are: Lernout and Hauspie, Centigram TruVoice, and the Creative TextAssist.
  850.  
  851. numeric := MinN
  852.  
  853. Syntax
  854.  
  855. ([Nth: numeric]; [Value: numeric])
  856.  
  857. Description
  858.  
  859. This command returns the Nth smallest value is a list of values.
  860.  
  861. Return Value
  862.  
  863. The Nth smallest value.
  864.  
  865. Parameter
  866.  
  867. Nth:
  868.  
  869. numeric    Which smallest value to return. I 1 is passed, the smallest value is returned. If the list has 10 values, then the 10th smallest value is the largest value.
  870.  
  871. Value: numeric    The list of data values to return the Nth smallest value for.
  872.  
  873. MMStopPlay
  874.  
  875. Syntax
  876.  
  877. (Handle: numeric)
  878.  
  879. Description
  880.  
  881. Stop a multimedia file started with MMPlay, with the DontWait! option set. With the Wait! option set, MMStopPlay has no effect.
  882.  
  883. Parameter
  884.  
  885. Handle: numeric    Returned by MMPlay.
  886.  
  887. MMStopSpeech
  888.  
  889. Example
  890.  
  891. Syntax
  892.  
  893. ()
  894.  
  895. Description
  896.  
  897. Stop a speech (text) file started with MMPlay (ASCII file), MMSpeak, or MMSpeakClipboard.
  898.  
  899. After a text file begins to speak, control immediately returns to the macro. Use MMStopSpeech to stop speaking a text file.
  900.  
  901. numeric := numeric MOD numeric
  902.  
  903. Description
  904.  
  905. Operator. Precedence level 3.
  906.  
  907. Return Value
  908.  
  909. Return the integer remainder of the quotient of two numbers.
  910.  
  911.  
  912.  
  913.  
  914.  
  915.  
  916.