Open a website with default browser

Find and share HowTos to various installations / configurations!
4 posts • Page 1 of 1
tomtiefi
Posts:2
Joined: Tue Aug 25, 2015 8:05 pm

Open a website with default browser

Post by tomtiefi »

Hello,

I use WinCC OA 3.11.
How can I open a website (webcam) with the button Clicked event?
I want to start the default browser.
Or what is the best practice?

Andorhal
Posts:127
Joined: Wed Nov 12, 2014 8:04 am

Re: Open a website with default browser

Post by Andorhal »

Hello Thomas,

the WebView Ewo allows you to display HTML content within your panels (not sure though if it had already been implemented in 3.11 or your specific webcam will be able to be displayed correctly)

or a simple system call (this opens the default browser):

Code: Select all

int rueck;
rueck=system("start /MIN http://www.etm.at"); 
  return 0;

mkoller
Posts:741
Joined: Fri Sep 17, 2010 9:03 am

Re: Open a website with default browser

Post by mkoller »

The correct way is:
use the std_help() function from our std.ctl library.
Doing so, you will do it in a platform neutral way and your script will work on all supported platforms (even new ones in the future, e.g. Android)
E.g.: std_help("http://my.web.site");

tomtiefi
Posts:2
Joined: Tue Aug 25, 2015 8:05 pm

Re: Open a website with default browser

Post by tomtiefi »

Thanks for your answers,

I tried the start command and the help function, both are okay for me. :)

4 posts • Page 1 of 1