Hardware manual
Impact Reference Guide Scriptor
4-117 Datalogic Automation Inc.
This command sets the specified property to the value. If this call is successful, the boolean variable (e.g.
successful) is set to True. The parameter format for a non-linked control value is:
("Panel Tab Name.Frame Name (if applicable).Property Name","value")
The parameter format for a linked control value is:
(Panel Tab Name.IMPACT Connector Control Name:Program Name.Task Name.Tool
Name:Property Name", "value")
This example sets the IP Address in the Impact Connector control in Panel 1.
boolean successful = Scriptor.setProperty("Panel 1.IMPACT Connector.IP
Address","192.168.0.128");
This example sets a value in a control that is linked to a tool (Circular Pattern Find) in a VPM task (Task).
boolean successful = Scriptor.setProperty("Panel 2.IMPACT Connector5:Indica-
tor.Task.Circular Pattern Find:Minimum Match Score", "50");
String getProperty(String propertyPath)
This command gets the specified property from a control and returns it as a String value. If the call is unsuc-
cessful, then a null value is returned to the script.
The parameter format for a non-linked control value is:
("Panel Name.Control Name.Property Name")
The parameter format for a linked control value is:
("Panel Name.IMPACT Connector Control Name:Program Name.Task Name.Tool
Name:Property Name")
This example gets the connected status of the Impact Connector control in Panel 1 and returns it as a string
(isConnected).
String isConnected = Scriptor.getProperty("Panel 1.IMPACT Connector.Connected");
This example gets a value from a control that is linked to a tool (Circular Pattern Find) in a VPM task (Task)
and returns it as a string (matchScore).
string matchScore = Scriptor.getProperty("Panel 2.IMPACT Connector5:Indica-
tor.Task.Circular Pattern Find:Minimum Match Score");
boolean executeMethod(String methodPath)
This command calls the specified method. If the call is successful, True is returned to the script. Example:
boolean successful = Scriptor.executeMethod("Panel 1.IMPACT Connector.Connect");
void sleep(int milliseconds)
This command causes the script to sleep for the indicated time before processing the next script command.
Example:
Scriptor.sleep(200); // sleep 200 milliseconds
void displayPrompt(String message)
This command pops up a modal dialog, displaying the indicated message. When the user clicks the OK but-
ton, the dialog is erased and script processing continues. Example:
Scriptor.displayPrompt("Error getting connection status");
boolean loadAndExecuteScript(String scriptPath)
This command loads and executes the specified script. This lets you execute a script from within another
script. If this call is successful, True is returned to the script. Example: