Loading...
This chapter gives an overview of the members available for the Projector device. Please read the chapter "Projector" if you would like to know how to add and use this device. As explained in the topic "Object and Member Notation (dot syntax)", a variety of objects can be addressed in the scripting language by using their members which set, or return if applicable, properties or methods of that object. Please refer to the chapter "Script Language" for more details about scripting in general.
Project.Projector(deviceName or ID) |
Example: Alternative Example: |
This gives access to all further members of the device "Projector" from the Configuration dialog. Using the Project object is an alternative to addressing the device directly by entering its name. The Project object allows you to address the device through its name or ID. Substituting the ID with a dynamic variable allows automation. Actions can be performed on many devices of the same type simultaneously, e.g. by using for-loops: For i = 1 to 10 { |
Projector_Name.Disable |
Example: Alternative Example: |
This disables the device "Projector" in the Configuration dialog as if the "Enable" check box in the window was unchecked. Use the .Enable member to reverse this command. |
Projector_Name.Enable |
Example: Alternative Example: |
This enables the device "Projector" in the Configuration dialog as if the "Enable" check box in the window was checked. Use the .Disable member to reverse this command. |
Projector_Name.IsEnabled |
Example: Alternative Example: |
This member returns the status of the check box "Enable" for the device "Projector1" in the Configuration dialog as a string or Boolean value. The result is "True" if the device is enabled and "False" if it is currently not enabled. The first example shows how to use it with a string variable named "xString". You can also write it into a Widget, e.g. a Label via the script: Label1.Text = Projector1.IsEnabled |
Projector_Name.IpAddress |
Example: Alternative Example: |
This returns the IP address of the device "Projector1" as a string. The result could look as follows: 10.169.80.10 The first example shows how to use it with a string variable named "vstring". You could also write it into a Widget, e.g. a Label via the script: Label1.Text = Projector1.IpAddress In return, you can also assign an IP address to the connected Projector device. WD automatically connects to it afterward. Projector1.IpAddress = "10.169.80.10" |
Projector_Name.IsConnected |
Example: Alternative Example: |
This member returns the connection status for the device "Projector1" as a Boolean value. The result is "True" if the device is connected and "False" if it is currently disconnected. The first example shows how to use it with a string variable named "vstring". You could also write it into a Widget, e.g. a Label via the script: Label1.Text = Projector1.IsConnected |
Projector_Name.Port |
Example: Alternative Example: |
This returns the port number of the "Projector1" device in the Configuration dialog as an integer value. The result could look as follows: 10001 The first example shows how to use it with an integer variable named "vint". You could also write it into a Widget, e.g. a Label via the script: Label1.Text = Projector1.Port In return, you can also assign another port to the connected Projector device. WD automatically connects to it afterward. Projector1.Port = 10002 |
Projector_Name.SendCommand |
Example: Alternative Example: |
Depending on the projector model used, there might be different ranges of commands (factory as well as custom commands added by the user). Use one of two options to call SendCommand(...): 1.Commands that only expect one argument: Projector1.SendCommand("PowerOn") 2.Commands that expect a second argument, which is assisted by the ScriptAssist, after having added a ',' after the first argument provided: Projector1.SendCommand("Focus", "IncreaseByOne") |
Projector_Name.SendQuery |
Example: Alternative Example: |
Queries are used to get a status from the device. Sending a query will get the user an answer via the MessageReceived event that needs to be subscribed to on the projector device instance. The script SendQuery has no return value. |
Projector_Name.SetQueryIntervalEnabled |
Example: Alternative Example: |
Set the interval enabled for the specified query (i.e. 'Power') to do recurring querying of the status. The default interval is 5000 ms which can be changed by the user via the device configuration. |
Projector_Name.SetQueryScriptExecutionEnabled |
Example: Alternative Example: |
Set 'Execute on receive' for the query specified. This will only execute the script defined in the device configuration if set 'True', in case the status information is received for the device. |