Job Management Partner 1/Software Distribution Automatic Installation Tool Description and Reference
This section covers the messages that may be displayed during execution and parsing of AIT files. These messages appear in the output window.
Unexpected token-1, missing token-2.
DEFINE
{
const integer OK_END = 0;
const integer NG_END = -1 // ";" is not specified.
const integer sloop_max = 30;
}DEFINE
{
const integer OK_END = 0;
const integer NG_END = -1; // ";" has been added.
const integer sloop_max = 30;
}Unexpected token
DEFINE
{
integer OK_END = 0;
integer sloop_max = 0;; // Two semicolons (;;) are specified.
}DEFINE
{
integer OK_END = 0;
integer sloop_max = 0; // The semicolon (;) has been deleted.
}A function name is used as an identifier.
DEFINE
{
integer AIT_LogMessage = 10;
}DEFINE
{
integer AIT_LogMessageNumber = 10;
}The number of nested levels is greater than 255.
The identifier name exceeds 64 characters.
DEFINE
{
integer sloop_max = 0;
integer sample123456sample123456sample123456sample123456sample123456sample = 0; // The specified variable name has 66 characters.
}DEFINE
{
integer sloop_max = 0;
integer sample123456 = 0; // The specified variable name
// has 64 or fewer characters.
}The string constant should not span multiple lines.
DEFINE
{
integer sloop_max = 0;
string SoftwareName = " My
Setup"; // The string constant is
// written over two lines.
}DEFINE
{
integer sloop_max = 0;
string SoftwareName = " My Setup"; // The specified string constant is in one line.
}Use a valid escape sequence.
DEFINE
{
integer sloop_max = 0;
string str1 = "sample'
testing";
}DEFINE
{
integer sloop_max=10;
string str1 = "sample_
testing";
}Identifiers cannot be used in case statements.
DEFINE
{
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
switch (FileVersion)
case stMsgText: // An identifier is specified
// in the case clause.
:
break;
default:
:
break;
endswitch;
}DEFINE
{
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
switch (FileVersion)
case "7.1": // A string constant which is not
// an identifier is specified.
:
break;
default:
:
break;
endswitch;
}Usage of the "+" or "-" signs is invalid.
DEFINE
{
integer sloop_count = 0;
}
MAIN
{
if (AIT_FileExists("#setup.exe") == 0)
:
:
sloop_count++; // The invalid operator"++" is used to
// increment the value of the variable.
endif;
}DEFINE
{
integer sloop_count = 0;
}
MAIN
{
if (AIT_FileExists("#setup.exe") == 0)
:
:
sloop_count = sloop_count + 1; // "++" is not used.
endif;
}The AIT file contains more than 65535 lines.
identifier : An identifier is undeclared.
DEFINE
{
string stMsgText;
}
MAIN
{
if (AIT_FileExists("#setup.exe") == 0)
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
sloop_max = 0; // This variable is not declared
// in the DEFINE section.
endif;
}DEFINE
{
string stMsgText;
integer sloop_max; // Variable sloop_max has been declared.
}
MAIN
{
if (AIT_FileExists("#setup.exe") == 0)
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
sloop_max = 0; // A declared variable is used.
endif;
}identifier: Redeclared.
DEFINE
{
integer sloop_max = 10;
string sloop_max = "sample"; // Variable sloop_max is
// redeclared as the string type.
}DEFINE
{
integer sloop_max = 10;
string stMsgText = "sample"; // Another variable name is used.
}The package information field package-item contains invalid data value.
PACKAGE_INFO
{
PackageID = "#$@#ADOBEACROBATREADER"; // The package ID contains
// invalid string #$@#.
Product = "Adobe Reader 6.0";
Version = "0060";
InstallerName = "AdbeRdr60_enu_full.exe";
InstallDrive = "C:";
InstallDirectory = "'Program Files'\Adobe'\Acrobat 6.0";
} PACKAGE_INFO
{
PackageID = "ACROBAT-READER"; // Invalid string #$@#
// has been deleted.
Product = "Adobe Reader 6.0";
Version = "0060";
InstallerName = "AdbeRdr60_enu_full.exe";
InstallDrive = "C:";
InstallDirectory = "'Program Files'\Adobe'\Acrobat 6.0";
}A 'const' cannot be re-assigned a value.
DEFINE
{
const float SLEEP_TIME = 2.0;
integer sloop_count;
}
MAIN
{
if (AIT_FocusWindow("Setup", "#32770",0.0) > 0)
AIT_PlayKey("{Enter}");
AIT_LogMessage("Setup: Enter");
sloop_count = 0;
SLEEP_TIME = 3.0; // The constant value for variable
// SLEEP_TIME is being changed.
AIT_Sleep(SLEEP_TIME);
endif;
}DEFINE
{
const float SLEEP_TIME = 3.0;
integer sloop_cnt;
}
MAIN
{
if (AIT_FocusWindow("Setup", "#32770",0.0) > 0)
AIT_PlayKey("{Enter}");
AIT_LogMessage("Setup : Enter");
sloop_cnt = 0;
AIT_Sleep(SLEEP_TIME);
endif;
}The AIT file analysis has been abnormally terminated because of a syntax error in the AIT file.
DEFINE
{
string ErrorTxt = "ABC
def";
}DEFINE
{
string ErrorTxt = "ABC_
def"; // "_" indicates the continuation of the string.
}Division by zero
DEFINE
{
integer sloop_count = 0;
const integer sloop_max = 30;
}
MAIN
{
sloop_count = sloop_max / 0; // As the divisor is 0, this
// results in and error.
}
DEFINE
{
integer sloop_count = 0;
const integer sloop_max = 30;
}
MAIN
{
sloop_count = sloop_max / 1; // The divisor has been changed
// to a value other than 0.
}data type-1 and data type-2 are incompatible for processing-name.
DEFINE
{
const integer ExeVersion = 7;
const string FileVersion = "7";
}
MAIN
{
if (ExeVersion == FileVersion) // The string and integer types
// are used for comparison.
...
...
endif;
}DEFINE
{
const integer ExeVersion = 7;
const integer FileVersion = 7;
}
MAIN
{
if (ExeVersion == FileVersion) // Variables of the same type
// are compared.
...
...
endif;
}operator-name incompatible for operation data-type-1.
DEFINE
{
float SLEEP_TIME = 7.1;
}
MAIN
{
SLEEP_TIME = SLEEP_TIME % 2; // float type cannot be used for
// remainder operation. This
// results in an error.
}DEFINE
{
integer SLEEP_TIME = 7;
}
MAIN
{
SLEEP_TIME = SLEEP_TIME % 2; // Integer-type variable is used
// for remainder operation.
}Specify an integer value between '-2147483648' and '2147483647'.
DEFINE
{
const integer OK_END = 21474836476; // Value exceeds the maximum.
}DEFINE
{
const integer OK_END =214748364; // Value is within the
// allowable range.
}Specify a float value between '3.402823466e+38' and '1.175494351e-38'.
DEFINE
{
const float NG_END = 3.402823466e+40; // Value exceeds the maximum.
}DEFINE
{
const float NG_END = 3.402823466e+10; // Value is within the
// allowable range.
}The data type for a switch expression is invalid.
DEFINE
{
const string FileVersion = "7.1";
integer sloop_max = 0;
}
MAIN
{
switch (FileVersion) // The switch statement is the string type.
case 7.1: // The case label is assigned an integer value.
...
...
break;
default:
...
...
break;
endswitch;
}DEFINE
{
const string FileVersion = "7.1";
integer sloop_max = 0;
}
MAIN
{
switch (FileVersion)
case "7.1": // A value of the string type is specified.
...
...
break;
default:
...
...
break;
endswitch;
}Unexpected EOF found in comment.
DEFINE
{
/* Data type used in the AIT file // The comment is not closed.
const integer NG_END = -1
const integer sloop_max = 30;
}DEFINE
{
/* Data type used in the AIT file */ // The comment is ended.
const integer NG_END = -1;
const integer sloop_max = 30;
}A character is unknown: hexadecimal-character-code.
DEFINE
{
const integer OK_END = 0;
const integer NG_END = -1;
const integer sloop_max = #30; // Invalid character "#" exists.
}DEFINE
{
const integer OK_END =0;
const integer NG_END = -1;
const integer sloop_max = 30; // Invalid character "#" is deleted.
}The use of the void data type in the expression is invalid. Use a valid datatype.
Case value value already used.
DEFINE
{
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
switch(FileVersion )
case "7.1":
...
...
break;
case "7.1": // Value "7.1" has already been used.
...
...
break;
default:
...
...
break;
endswitch;
}DEFINE
{
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
switch(FileVersion )
case "7.1": // Duplicate case value "7.1" has been deleted.
...
...
break;
default:
...
...
break;
endswitch;
}function name : A function name is invalid.
DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion)
if (AIT_FileExists1("#setup.exe") == 0) // AIT_FileExists1 is
// not a valid API name.
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
endif;
endif;
}DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion)
if (AIT_FileExists("setup.exe") == 0) // Valid API name
// has been specified.
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
endif;
endif;
}function name : The function does not take the number-of-specified-parameters parameter.
DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion)
if (AIT_FileExists() == 0)
// Argument was specified for AIT_FileExists.
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
endif;
endif;
}DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion)
if (AIT_FileExists("#setup.exe") == 0) // A parameter has been
// specified for
// AIT_FileExists.
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
endif;
endif;
}One or more arguments specified for the function are of invalid data type.
DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion )
if (AIT_FileExists("#setup.exe") == 0)
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
AIT_Sleep(3); // Integer value is specified in
// AIT_Sleep.
endif;
endif;
}DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == Version)
if (AIT_FileExists("#setup.exe") == 0)
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
AIT_Sleep(3.1); // Data type has been changed from
// integer to float.
endif;
endif;
}The label label-name is undefined.
DEFINE
{
integer sloop_max = 0;
}
MAIN
{
goto ErrorLabel; // Label ErrorLabel is undefined.
sloop_max = 0;
}DEFINE
{
integer sloop_max = 0;
}
MAIN
{
goto ErrorLabel;
sloop_max = 0;
ErrorLabel: // The label has been defined.
}The label label-name for the goto statement is in a different block.
DEFINE
{
string stMsgText;
}
MAIN
{
goto ErrorLabel; // goto statement is defined in MAIN section.
}
ERROR
{
ErrorLabel: // Label is defined in ERROR section.
stMsgText = "Setup(English) " + InstallerName + " Not Found";
}DEFINE
{
string stMsgText;
}
MAIN
{
goto ErrorLabel;
ErrorLabel: // The label is defined in the MAIN section.
stMsgText = "Setup(English) " + InstallerName + " Not Found";
}The value assigned to the variable is of an invalid data type.
DEFINE
{
const integer OK_END =0;
const integer NG_END = -1;
const integer sloop_max = "30"; // A string value is assigned
// to an integer-type variable.
}DEFINE
{
const integer OK_END =0;
const integer NG_END = -1;
const integer sloop_max = 30; // integer value, not a string
// value has been assigned.
}An invalid 'break' statement was found.
DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion )
if (AIT_FileExists("#setup.exe") == 0)
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
break; // The break statement is in the if statement.
endif;
endif;
}DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion)
if (AIT_FileExists("#setup.exe") == 0)
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
endif;
endif;
}An invalid 'continue' statement was found.
DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion)
if (AIT_FileExists("#setup.exe") == 0)
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
continue; // The continue statement is in the if statement.
endif;
endif;
}DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion)
if (AIT_FileExists("#setup.exe") == 0)
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
endif;
endif;
}loop-structure cannot have more than 255 break statements.
loop-structure cannot have more than 255 continue statements.
The 'switch' statement cannot have more than 255 case labels.
The 'switch' statement cannot have more than one default label.
DEFINE
{
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
switch(FileVersion )
case "7.1":
...
...
break;
default: // First default statement
...
...
break;
default: // Two default statements are specified.
...
...
break;
endswitch;
}DEFINE
{
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
switch(FileVersion)
case "7.1":
...
...
break;
default: // Only one default statement is specified.
...
...
break;
endswitch;
}A required field field-name is missing in the Package Info block.
PACKAGE_INFO
{
// The package ID that must be specified is missing.
Product = "Adobe Reader 6.0";
Version = "0060";
InstallerName = "AdbeRdr60_enu_full.exe";
InstallDrive = "C:";
InstallDirectory = "'Program Files'\Adobe'\Acrobat 6.0";
}PACKAGE_INFO
{
PackageID = "ADOBEACROBATREADER"; // The required package item
// has been specified.
Product = "Adobe Reader 6.0";
Version = "0060";
InstallerName = "AdbeRdr60_enu_full.exe";
InstallDrive = "C:";
InstallDirectory = "'Program Files'\Adobe'\Acrobat 6.0";
}Unary operators '+', '-' and '!' cannot be used with a string constant.
DEFINE
{
const integer OK_END =0;
const integer NG_END = -1;
const string szMsgText = !"30"; // "!" is used together with a
// string constant.
}DEFINE
{
const integer OK_END =0;
const integer NG_END = -1;
const string szMsgText = "30"; // "!" has been deleted.
}The use of labels is invalid in an expression.
DEFINE
{
integer sloop_max = 0;
}
MAIN
{
ErrorLabel:
if (ErrorLabel) // The label is used in the if structure.
AIT_LogMessage("Setup(English)For Windows-Start");
if (AIT_FileExists("#setup.exe") == 0)
goto ErrorLabel;
sloop_max = 0;
endif;
endif;
}DEFINE
{
integer sloop_max = 0;
string stMsgText;
}
MAIN
{
if(1) // The label has been deleted from the expression.
if (AIT_FileExists("#setup.exe") == 0)
goto ErrorLabel;
sloop_max = 0;
endif;
ErrorLabel:
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
endif;
}The "!" operator is not allowed in case statements.
DEFINE
{
const integer FileVersion = 7;
string stMsgText;
}
MAIN
{
switch (FileVersion)
case 7:
...
...
break;
case 5 + 1: // Expression cannot be used in a case label.
...
...
break;
default:
...
...
break;
endswitch;
}DEFINE
{
const integer FileVersion = 7;
string stMsgText;
}
MAIN
{
switch (FileVersion)
case 7:
...
...
break;
case 6: // The expression has been deleted, and a constant
// is specified, instead.
:
:
break;
default:
:
:
break;
endswitch;
}The AIT file version is higher than the DLL version of the execution engine.
Conversion from higher-ranking-data-type to lower-ranking-data-type: Possible loss of accuracy
DEFINE
{
const integer OK_END = 0;
const integer SLEEP_TIME = 3.8; // An attempt has been made to assign the integer variable the float-type variable. The value is rounded down, with only 3 saves in the variable.
}DEFINE
{
const integer OK_END =0;
const float SLEEP_TIME = 3.8; // The variable type has been changed to the float type.
}Unsafe use of boolean variable for processing.
DEFINE
{
const integer Sloop_Max = 30;
integer sloop_count;
bool IsPathSet = false;
}
MAIN
{
sloop_count = sloop_max / IsPathSet; // The Boolean variable is specified as the divisor.
}DEFINE
{
integer NG_END = 1;
const integer sloop_max = 30;
integer sloop_count;
}
MAIN
{
sloop_count = sloop_max / NG_END; // The Boolean variable has been deleted, and the integer-type variable has been specified as the divisor.
}Unsafe mix of type data-type-1 and type data-type-2 in operation operator.
DEFINE
{
integer sloop_max = 0;
bool IsPathSet;
}
MAIN
{
sloop_max = sloop_max & IsPathSet; // The integer and bool types are specified for bit logical AND.
}DEFINE
{
integer sloop_max = 0;
integer sloop_count;
}
MAIN
{
sloop_max = sloop_max & sloop_count; // Integer types have been specified for bit logical AND.
}Switch statement contains only default label.
DEFINE
{
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
switch(FileVersion)
default: // Only the default label is used in the switch statement.
:
:
break;
endswitch;
}DEFINE
{
const string FileVersion = "7.1";
string stMsgText;
}
MAIN
{
switch(Version )
case "7.1": // The switch statement contains the case statement.
...
...
break;
default:
...
...
break;
endswitch;
}label-name: Unreferenced label.
DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
integer sloop_max = 0;
}
MAIN
{
if (ExeVersion == FileVersion )
ErrorLabel: // The goto statement associated with the label does not exist.
AIT_LogMessage("Setup(English)For Windows-Start");
if (AIT_FileExists("#setup.exe") == 0)
sloop_max = 0;
endif;
endif;
}DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
integer sloop_max = 0;
}
MAIN
{
if (ExeVersion == FileVersion)
AIT_LogMessage("Setup(English)For Windows-Start");
if (AIT_FileExists("#setup.exe") == 0)
goto ErrorLabel; // The goto statement has been specified.
sloop_max = 0;
endif;
ErrorLabel: // The label is defined.
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
endif;
}variable name: Unreferenced variable.
DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
integer sloop_max; // This variable is not referenced from anywhere in the program.
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion)
AIT_LogMessage("Setup(English)For Windows-Start");
if (AIT_FileExists("#setup.exe") == 0)
stMsgText = "Setup(English) " + InstallerName + " Not Found";
endif;
endif;
}DEFINE
{
const string ExeVersion = "7.1";
const string FileVersion = "7.1";
integer sloop_max;
string stMsgText;
}
MAIN
{
if (ExeVersion == FileVersion)
AIT_LogMessage("Setup(English)For Windows-Start");
if (AIT_FileExists("#setup.exe") == 0)
sloop_max = 0;// Variable sloop_max is used.
stMsgText = "Setup(English) " + InstallerName + " Not Found";
AIT_LogMessage(stMsgText);
endif;
endif;
}All Rights Reserved. Copyright (C) 2009, 2013, Hitachi, Ltd.
Copyright, patent, trademark, and other intellectual property rights related to the "TMEng.dll" file are owned exclusively by Trend Micro Incorporated.