Jump to content

Recommended Posts

Does anyone know how I would open a weblink via a GUI button?


The weblink is split due to needing to add the missionName in it for the link to go to the current mission.

 

_orbat = "https://unitedtaskforce.net/operations/auth/" + missionName + "/orbat";

 

if I hint _orbat it spits the correct url out. I just need that url to open a webpage.

 

Anyone know or a way to do this?

 

For reference the button is running this action 

action = "execVM 'Menu\Weblinks\OpenOrbat.sqf'";

Thank you in advance.

Share this post


Link to post
Share on other sites

You can't just open a website via script (cuz security).

You maybe can use structured text, to add a link into existing text.

Share this post


Link to post
Share on other sites

I do this for my public server mission in a briefing, the "execute expression" stuff isn't necessary for a button:

 

player createDiaryRecord ["Diary",[

"Muh Site",

"<execute expression='copyToClipboard ""https://www.CoolWebsite.com"";'>Copy URL</execute> (Click link and press Ctrl+V into browser)"

]];

 

 

In the action of a button, could just do:

"copyToClipboard 'http://www.MyCoolSite.com';"

 

 

What it does is simply copies the URL to the player's "clipboard" so they can paste the link into a browser easily. Can't pull up sites anymore. (Think it was doable in early A3 and A2?)

 

You CAN make YouTube videos open through the Steam overlay via the openYoutubeVideo command

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

 

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites

This is your answer.... Inspired by larrows post

All kudos and credit goes to him. I just improved on his original concept
 

 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×