Previous Document Next Document

Object Model Reference : Classes : C : CorelScriptTools : Methods : CorelScriptTools.GetVersion


CorelScriptTools.GetVersion

Function GetVersion(Option As Long) As Long

Description

Member of CorelScriptTools

The GetVersion method returns the system or Corel SCRIPT version numbers.

Parameter
Description
Option
Specifies the system or Corel SCRIPT component to query
0 = Corel SCRIPT run-time interpreter version (the SCINTxx.DLL file being used with the current session of Corel SCRIPT)
10 = Corel SCRIPT compiler version number
30 = Windows platform
31 = Windows major version number
32 = Windows minor version number
33 = Windows build number

The GetVersion method returns one of the following values:

 
Option 0 = Corel SCRIPT run-time interpreter, a four-digit number in which the first two digits represent the major version number and the last two digits represent the minor version number. For example, the four digit number 7001 indicates major version 7.0 and minor version 01.
 
Option 10 = Corel SCRIPT compiler version, a four-digit number in which the first two digits represent the major version number and the last two digits represent the minor version number. For example, the four digit number 7001 indicates major version 7.0 and minor version 01.
 
Option 30 = Windows platform, a single-digit number indicating the Windows platform that Corel SCRIPT is being used with (0 for Win32s [Windows 3.11], 1 for Windows 95, and 2 forWindows NT)
 
Option 31 = Windows major version number. For example, if you’re running Windows 95 and your Windows version number is 4.00.950, the major version number is 4. The same applies to Windows NT.
 
Option 32 = Windows minor version number. For example, if you’re running Windows 95 and your Windows version number is 4.00.950, the minor version number is 0.
 
Option 33 = Windows build number. For example, if you’re running Windows 95 and your Windows version number is 4.00.950, the minor version number is 950.

 
For a script, executable, DLL, or Corel add-on created with Corel SCRIPT to run, the major version numbers for Corel SCRIPT (the compiler) and the Corel SCRIPT run-time interpreter (SCINTxx.DLL) must be the same or else an error occurs. A difference in the minor version numbers does not cause an error.
Example

In the following code example, the first line passes the Corel SCRIPT version number to CS_version. A message box is then used to display the first two digits in CS_version by using the LEFT function. Next, a message box is used to display the first two digits in CS_version by using the RIGHT function.

CS_version = GETVERSION(10)
MESSAGE "Corel SCRIPT major version number " & LEFT (CS_version, 2)
MESSAGE "Corel SCRIPT minor version number " & RIGHT (CS_version, 2)

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.