Open a website on ignition perspespective using a button

Hello, I want open a web site on ignition perspective with a python script with a button action.
I don’t want use a link component

I think you can just use

system.perspective.navigate(url="https://www.google.com") - does this work?

1 Like

For future reference: The script console in the designer is a terrible way to test code for Perspective action scripts–it is the wrong scope. It can be suitable for testing Vision code, as the scope is closely related.

2 Likes

Or the navigation thingie that seems to be built for exactly that:

1 Like

my script will have to retrieve the link of the website in the database

Based on what ?
You could bind a custom prop to the query, then use that custom prop in the panel I showed above.

Use Brian’s answer. You can’t use local java operations (like BrowserLauncher) to cause actions in a Perspective session. Only Vision can do that.

1 Like

I tryied but this method don’t work

Of course that won’t work in the script console–the script console is not a Perspective scope. Put that in a script action on a Perspective pushbutton. (Or wherever.)

Let me repeat: The designer’s script console is a terrible tool for testing scripts for Perspective. Don’t use it for Perspective.

2 Likes

I put that in a script action on a Perspective it work thank you