A vector is a one-dimensional matrix with n positions. Each position can store a value of any type. Vectors are commonly used in automated scripts, because they allow multiple values to be stored in a single script variable.
Example of vector statement:
‘states a 3-position vector
Dim auxVetor(2)
‘saves values in each position
auxVetor(0) = 15
auxVetor(1) = 47.8
auxVetor(2) = “test”
Another option is using Array method:
‘states a script variable
Dim auxVetor
‘saves a vector inside it
auxVetor = Array(15, 47.8, “test”)
Before proceeding to Lesson 2, we recommend reading the following articles:
Basic VBScript for Elipse E3: Lesson 8 – Arrays.
KB-30127: Using an internal tag as vector (Array).
KB-47537: Measuring arrays.
KB-45438: Declaring a dynamic Array.
Related articles
- Automation in code generation: Introduction.
- Automation in code generation: Lesson 1 – Working with vectors.
- Automation in code generation: Lesson 2 – Reading information from an Excel file.
- Automation in code generation: Lesson 3 – Changing a string into a vector.
- Automation in code generation: Lesson 4 – Scanning specific objects in a location.
- Automation in code generation: Lesson 5 – Adding objects via scripts.
- Automation in code generation: Lesson 6 – Checking for pre-existing objects.
- Automation in code generation: Lesson 7 – Events for script execution.