openURL reading address from variable

I am trying to use the open URL command, but I need to read the IP Address for the URL out of a variable. How would I script that?

Are you referring to the scripting function system.net.openURL? What are you using as a variable to store the IP Address for the URL?

I have the IP address shown here is a variable. I want to use this script in a template with a variable reference for the address for different devices the system is connecting to

I am having trouble following, you don’t have any variables shown, just a string containing a URL. If you mean you want to pass your template an ip address and build a URL out of that, then that’s easy. Create a parameter in your template and do some string concatenation in your event to form a proper URL.

I want to use this script in a template with a variable reference for the address for different devices the system is connecting to

The IP Addresses of the devices connected to Ignition’s OPC UA Server can be found using the ‘Hostname’ Device Diagnostics Tag created for each device:
image

You can create an OPC tag through the Tag Browser or you can use system.opc.read within your script with the item path to the ‘Hostname’ tag, for example ‘ns=1;s=[DeviceName][Diagnostics]/Hostname’. This will return the IP Address of the device if you specify it under the ‘Hostname’ property in the device connection.

The 192.168.59.112 will come from the host name of the device because there will be multiple devices and i want to make a template with a udt