Handling script errors.
A script error can happen for several different reasons. Some examples are: The operator forgot to fill in a Setpoint and then hit a button; The script required the value…
A script error can happen for several different reasons. Some examples are: The operator forgot to fill in a Setpoint and then hit a button; The script required the value…
Question: How can I keep the user from typing special characters in a setpoint ? Solution: To do so, you must add the following script to Setpoint’s Validate event: N…
Question: When there is no communication with the device, why does WriteEx() method not return script errors, unlike a regular write on tag, which always returns this type of error?…
Question: How can I create a digital link via scripts? Solution: Example: set bind = Screen.Item(“Text1”).Links.CreateLink(“Value”, “Data.Tag1.Value”, 3) bind.OnValue = “Text ON” bind.OffValue = “Text OFF”
Autor
Mateus Machado
Question: At an application, the following script is being used: Application.ShowFilePicker true, Application.GetObject(“Data.InternalTag1”).Value, , 98 Why is the Internal Tag not receiving the selected file’s path? Solution: This happens because…
Question: Is there a command to open windows that is similar to MsgBox, but with a field for typing text? Solution: Yes, this is what VBScript’s InputBox is for. Script…
Question: Is there a manual with scripts examples and explanations about the VBScript’s properties, methods and parameters? Solution: You can use E3’s Scripts Reference Manual and the VBScript Reference Guide.
Question: How can I work with a function in E3 scripts? Solution: To do so, you must set the function with the structure: Function Name(parameter1, parameter2,.., parameterN) scriptEnd function Example: Sub…
Question: On Windows 2003 Server SP2, when executing scripts that work with Double data, a script error occurs with an Overflow message. How can I fix the problem?Solution: To do…