ScriptForDisplayOnly()
Specifies that the script is designed for displaying information only and that its author doesn’t care about the verification script result. Such a script has a result <DONE> after execution.
ScriptForDisplayOnly ()
Example
ScriptForDisplayOnly();
Sleep()
Asks VSE not to send any events to a script until the timestamp of the next event is greater than the timestamp of the current event plus a sleeping time.
Sleep(time)
|
Parameters |
|
|---|---|
|
time |
VSE time object specifying sleep time |
Example
# Don’t send any event that occurred during 1 ms from the current event.
Sleep (Time(1000));
ConvertToHTML()
This function replaces spaces with " " and carriage return symbols with "<br>" in a text string.
ConvertToHTML(text_string)
|
Parameters |
|
|---|---|
|
text_string |
Text string |
Example
str = "Hello world !!!\n";
str += "How are you today?";
html_str = ConvertToHTML (str);
# html_string = "Hello world !!!<br>How are you today?"
Note: Some other useful miscellaneous functions can be found in the file VSTools.inc.
Pause()
Pauses script running. Later, script execution can be resumed or cancelled.
Pause()
Example
…
If(Something_Interesting())
{
GotoEvent(); # Jump to the trace view.
Pause(); # Pause script execution.
}
…
Remarks
This function works only for a VS Engine controlled via a GUI. For VSEs controlled by COM/Automation™ clients, it does nothing.
Compute64BitOperation ()
Performs a specified arithmetic, bitwise, shift, or comparison operation on two 64-bit operands, each represented by two 32-bit dwords (high and low). The returned value is a list containing the low and high parts of the 64-bit result.
Compute64BitOperation( op1_high_dw, op1_low_dw, op2_high_dw, op2_low_dw, operator_type)
|
Parameters |
|||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
op1_high_dw |
High 32 bits of the first operand. |
||||||||||||||||||||||||||||||||||||
|
op1_low_dw |
Low 32 bits of the first operand. |
||||||||||||||||||||||||||||||||||||
|
op2_high_dw |
High 32 bits of the second operand. |
||||||||||||||||||||||||||||||||||||
|
op2_low_dw |
Low 32 bits of the second operand. |
||||||||||||||||||||||||||||||||||||
|
operator_type |
Constant value of type arithmatic operation specifying the operation to perform. Possible values are:
|
||||||||||||||||||||||||||||||||||||
Return Value
Contains the result of the operation split into low and high 32-bit parts, if operation is succesful.
Returns an empty list if division by zero occurs.
Returns false if an invalid operation type is provided.
Example
op1_high = 0x00000001;
op1_low = 0x00000011;
op2_high = 0x00000020;
op2_low = 0x00001122;
result = Compute64BitOperation(op1_high, op1_low, op2_high, op2_low, _OP_Add);
res_low = result[0]; # Lower 32 bits
res_high = result[1]; # Upper 32 bits