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

  1. numeric := gcf
  2.  
  3. Syntax
  4.  
  5. ({Value: numeric})
  6.  
  7. Description
  8.  
  9. Return the greatest common factor of a list of values.
  10.  
  11. The greatest common factor is the largest number that will divide evenly into all the specified values. If the values have no common factor, 1 is returned.
  12.  
  13. Example
  14.  
  15. x = gcf (2;8;17)
  16.  
  17. MessageBox (Caption:"Example"; Message:" gcf (2;8;17)= "+ x; Style:OK!)
  18.  
  19. Return Value
  20.  
  21. Greatest common factor of a list of values.
  22.  
  23. Parameter
  24.  
  25. Value: numeric    The list of values. Multiple values are separated by a semicolon.
  26.  
  27. string := GetCurrentDirectory
  28.  
  29. Example
  30.  
  31. Syntax
  32.  
  33. ()
  34.  
  35. Description
  36.  
  37. Get the name of the current directory.
  38.  
  39. Return Value
  40.  
  41. Name of the directory in which the macro is stored.
  42.  
  43. enumeration := GetFileAttributes
  44.  
  45. Example
  46.  
  47. Syntax
  48.  
  49. (Filename: string)
  50.  
  51. Description
  52.  
  53. Return DOS file attributes.
  54.  
  55. Return Value
  56.  
  57. One of the following values, or a negative number if an error occurs. GetFileAttributes can return more than one value at a time. Use bitwise operators to determine the values.
  58.  
  59. Return Value    Attribute
  60.  
  61. Negative    Error!
  62.  
  63. 1    ReadOnly!
  64.  
  65. 2    Hidden!
  66.  
  67. 4    System!
  68.  
  69. 8    Label!
  70.  
  71. 16    Directory!
  72.  
  73. 32    Archive! (the file has changed since the last save)
  74.  
  75. 128    Normal!
  76.  
  77. Parameters
  78.  
  79. Filename: string    Include the full path.
  80.  
  81. numeric := GetFileDateAndTime
  82.  
  83. Example
  84.  
  85. Syntax
  86.  
  87. (Filename: string)
  88.  
  89. Description
  90.  
  91. Return a number representing the date and time a file was last written to. Use DateString and TimeString functions to convert the number to a string.
  92.  
  93. Example
  94.  
  95. vNumber = GetFileDateAndTime("c:\...\<filename>")
  96.  
  97. vDate = DateString(vNumber)
  98.  
  99. vTime = TimeString(vNumber)
  100.  
  101. MessageBox(;; vDate + " -- " + vTime)
  102.  
  103. Explanation: Displays date and time <filename> was created.
  104.  
  105. Return Value
  106.  
  107. A number representing a date and time, or -1 if an error occurs.
  108.  
  109. Parameters
  110.  
  111. Filename: string    Include the full path and filename.
  112.  
  113.  
  114.  
  115. DateType    The type of date and time to return. If missing, ModificationDatTime! Is used.
  116.  
  117. CreationDateTime! Returns date and time file was created.
  118.  
  119. LastAccessDateTime! Returns date and time file was last accessed.
  120.  
  121. ModificationDateTime! Returns date and time file was last modified.
  122.  
  123.  
  124.  
  125. GetNumber
  126.  
  127. Example
  128.  
  129. Syntax
  130.  
  131. (VariableName: variable; [Prompt: string]; [Title: string])
  132.  
  133. Description
  134.  
  135. Display a dialog box that contains an edit control to enter an integer or real number. 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.
  136.  
  137. Parameters
  138.  
  139. VariableName: variable    The number entered in the edit box is returned in this variable.
  140.  
  141. Prompt: string (optional)    The text displayed above the edit control. Use NToC(0F90Ah) to insert a hard return code in the prompt string. For example,
  142.  
  143. GetNumber(vAns; "First line" + NToC(0F90Ah) + "Second line"; "Title")
  144.  
  145. creates two lines above the edit box. The next example creates three lines, including one blank line:
  146.  
  147. HdReturn = NToC(0F90Ah)
  148.  
  149. GetNumber(vAns; "First line" + HdReturn + HdReturn + "Second line"; "Title")
  150.  
  151. Title: string (optional)    The text displayed in the title bar. If missing, Corel PerfectScript is used.
  152.  
  153. OLEObjectVariable := GetObject
  154.  
  155. Syntax
  156.  
  157. ([FileName: string]; [ClassName: string]
  158.  
  159. Description
  160.  
  161. Obtains the instance of an OLE object.
  162.  
  163. Return Value
  164.  
  165. Instance that identifies an OLE object. After an OLE object variable is assigned an object instance, commands can be called, and values obtained and set for the object variable. When the object and variable are no longer needed, use the Discard command to destroy the object instance.
  166.  
  167. Parameters
  168.  
  169. FileName: string (optional)    Name of the file associated with an OLE object. Find the object type using the Windows filename extension associations. If missing, ClassName is used.
  170.  
  171. ClassName: string (optional)    Class name of the OLE object to obtain, also called the ProgID. This must be the name of a registered OLE automation object. If missing, FileName is used.
  172.  
  173. Note
  174.  
  175.   This command is not available for use on a Linux operating system.
  176.   
  177. GetString
  178.  
  179. Example
  180.  
  181. Syntax
  182.  
  183. (VariableName: variable; [Prompt: string]; [Title: string]; [Length: numeric])
  184.  
  185. Description
  186.  
  187. Display a dialog box that contains an edit control to enter a character string. 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.
  188.  
  189. Parameters
  190.  
  191. VariableName: variable    The character string entered in the edit box is returned in this variable.
  192.  
  193. Prompt: string (optional)    The text displayed above the edit control. Use NToC(0F90Ah) to insert a hard return code in the prompt string. For example,
  194.  
  195. GetString(vAns; "First line" + NToC(0F90Ah) + "Second line"; "Title")
  196.  
  197. creates two lines above the edit box. The next example creates three lines, including one blank line:
  198.  
  199. HdReturn = NToC(0F90Ah)
  200.  
  201. GetString(vAns; "First line" + HdReturn + HdReturn + "Second line"; "Title")
  202.  
  203. Title: string (optional)    The text displayed in the title bar. If missing, Corel PerfectScript is used.
  204.  
  205. Length: numeric (optional)    The maximum number of characters the edit control accepts. The default is unlimited.
  206.  
  207. GetUnits
  208.  
  209. Example
  210.  
  211. Syntax
  212.  
  213. (VariableName: variable; [Prompt: string]; [Title: string])
  214.  
  215. Description
  216.  
  217. Display a dialog box that contains an edit control to enter a number and unit of measure. 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.
  218.  
  219. The units of measure are " (inches); i (inches); c (centimeters); m (millimeters); p (points-72 per inch); and w (WordPerfect units-1200 per inch). If a unit of measure is not specified, the default is WordPerfect units. To change the default, use DefaultUnits.
  220.  
  221. Parameters
  222.  
  223. VariableName: variable    The number and unit of measure entered in the edit box is returned in this variable. If no unit of measure is specified, the default is returned.
  224.  
  225. Prompt: string (optional)    The text displayed above the edit control. Use NToC(0F90Ah) to insert a hard return code in the prompt string. For example,
  226.  
  227. GetUnits(vAns; "First line" + NToC(0F90Ah) + "Second line"; "Title")
  228.  
  229. creates two lines above the edit box. The next example creates three lines, including one blank line:
  230.  
  231. HdReturn = NToC(0F90Ah)
  232.  
  233. GetUnits(vAns; "First line" + HdReturn + HdReturn + "Second line"; "Title")
  234.  
  235. Title: string (optional)    The text displayed in the title bar. If missing, Corel PerfectScript is used.
  236.  
  237. Global
  238.  
  239. Example
  240.  
  241. Syntax
  242.  
  243. ({<VariableName> variable := <Value> any})
  244.  
  245. Description
  246.  
  247. Declare global variables and arrays, and assign them to the global variable table.
  248.  
  249. Global variables can be used in Run or Chain macros.
  250.  
  251. Parameters
  252.  
  253. <VariableName> variable    One or more user-defined variables separated by a semicolon. Variables must begin with a letter and can include any other combination of letters or numbers. Parentheses are optional. For example,
  254.  
  255. Global Variable; Variable
  256.  
  257. Global(Variable; Variable)
  258.  
  259. are both valid statements. The following example declares global arrays with 10 elements and 20 elements:
  260.  
  261. Global FirstArray[10]; NextArray[20]
  262.  
  263. The last example simultaneously declares a variable and assigns a value:
  264.  
  265. Global x := 2
  266.  
  267. or...
  268.  
  269. Global x
  270.  
  271. x := 2
  272.  
  273. If you create two variables with the same name (for example, Global x and Persist x), the following statement
  274.  
  275. Global x := 5
  276.  
  277. specifies which variable x is assigned the value 5.
  278.  
  279. <Value> any (optional)    The value assigned to <Variable> at time of declaration. For example, Global vTest = 20. vTest equals 20 at run time. If missing, the value of <Variable> is undefined.
  280.  
  281. Go
  282.  
  283. Example
  284.  
  285. Syntax
  286.  
  287. (<Label> label)
  288.  
  289. Description
  290.  
  291. Jump to a Label statement and do not return.
  292.  
  293. Go is generally used to exit multiple layers of nested statements, or to create a loop.
  294.  
  295. Parameters
  296.  
  297. <Label> label    The name of a label. It begins with a letter and consists of one or more letters or numbers.
  298.  
  299. GoOnLine
  300.  
  301. Syntax
  302.  
  303. ([Service: enumeration]; [Location: string])
  304.  
  305. Description
  306.  
  307. Start an online service at a specified location.
  308.  
  309. Parameters
  310.  
  311. Service: enumeration (optional)    If missing, Internet! is used.
  312.  
  313. Internet!
  314.  
  315. CompuServe!
  316.  
  317. Other!
  318.  
  319. Location: string (optional)    Service location at which to start. For example, GoOnLine(Internet!; "http://home.netscape.com") starts the default Internet browser at the Netscape Navigator* home page. For CompuServe, this is the "GO" location. If Service is Other!, Location is the command line to execute and is required.
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.