Advertisement
Guest User

open_url(url)

a guest
Jan 10th, 2022
698
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // implementation
  2. function open_url(url) {
  3.   var escapedfolder = string_replace_all(url, "\"", "\\\"");
  4.   if (os_type = os_windows) execute_shell("cmd", "explorer \"" + escapedfolder + "\"");
  5.   else if (os_type = os_macosx) execute_shell("open", "\"" + escapedfolder + "\"");
  6.   else if (os_type = os_linux) execute_shell("xdg-open", "\"" + escapedfolder + "\"");
  7. }
  8.  
  9. // usage example
  10. open_url("https://www.yoyogames.com/");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement