dcamp1
August 20, 2021, 5:27pm
1
I’m running Ignition 7.9.10.
If I create a window and just put a button that will ran this script system.net.openurl(“http://www.google.com ”)
Will it open the default browser installed on the client of will it run the default browser installed on the server?
It’ll open it on the client (whatever machine the button is actually pushed on).
dcamp1
August 20, 2021, 5:34pm
3
Thanks, I needed to make sure.
dcamp1
August 20, 2021, 5:58pm
4
OK, Sorry, but do you have to have the WEB BROWSER MODULE before you can execute this script?
system.net.openurl(“http://www.google.com ”)
Because nothing happens when I try to run this script.
Not sure if that is just a typo in the forum, but just in case, the "url" in "openurl" needs to be uppercase:
system.net.openURL("http://www.google.com")
dcamp1
August 21, 2021, 1:59am
7
Thanks nminchin I have read that but since it was not working I was having trouble as to why.
WillMT10 has brought to my attention that I was not using the correct case when I created the script. I will give that a try and see what turns out.
Thanks to both for all the help and information.
dcamp1
August 21, 2021, 10:50am
8
Still needing help!
I created a simple window 1195 x 795 size, placed a container on that window 1175 x 775 size, then placed a button object and set the key press event to run this script.
system.net.openURL(“http://www.google.com ”)
When I test in run mode nothing seems to be working.
Maybe I’m expecting the wrong results! I would expect that google would open in the container.
Am I missing something else?
That function opens the URL in your platforms own browser, and only if allowed, not within the Ignition client. To open within the client, you need the web browser module.
dcamp1
August 21, 2021, 7:14pm
10
OK, now I’m beginning to see how things will work.
Thanks
And in this case, you wouldn’t be using this function, you would be setting the url property on the web browser component to your url
1 Like