AssignSyntax.Right Property

Applies to TestComplete 15.63, last modified on April 23, 2024

Description

Use the AssignSyntax.Right property to get or set the syntax element on the right side of the assignment operator. This element corresponds to the value or expression whose result will be assigned to the variable or property specified by the Left property.

Declaration

AssignSyntax.Right

Read-Write Property Variant

Applies To

The property is applied to the following object:

Property Value

The Right property can hold one of the following values:

  • A number, string, boolean or any other primitive value.
  • An InvokeSyntax object that corresponds to a variable, property, routine or method expression.
  • A ConditionSyntax object that corresponds to a logical or conditional expression.
  • The Sys object, a window or onscreen object, or a property of any of these objects, or the result of a method execution of any of these objects. See the Remarks section for details.

Remarks

As mentioned above, the Right property can be assigned to the Sys, process, window or onscreen object or the return value of a member of any of these objects. In this case, you should keep in mind the following:

  • The desired object can be addressed by its fully-qualified name via the Sys object as well as by a custom name via the NameMapping or Aliases object. Note, that you can only use those custom names that are specified in the NameMapping item of the user’s active project.

  • The object being referenced must exist, otherwise an error will occur.

If the underlying expression of the Right property results in an object reference, you must set the AssignSyntax.IsObject property to True. This is required because in VBScript, object and non-object assignments are treated differently: to assign an object to a variable, one should use the Set keyword:

VBScript

Set p = Sys.Process("notepad")

By setting the IsObject property to True, you indicate that you assign an object reference. In this case, when generating VBScript code the syntax subsystem will add the Set keyword before the variable name so that you will get a valid script.

See Also

Left Property
IsObject Property

Highlight search results