Advertisement
AFRLme

Launch URL from Default Browser [VS] (working)

Nov 5th, 2012
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. -- [launch_url_from_default_browser] (function inside a definition script - example one)
  2. -- uses a local variable - in this case we used "result" as the variable!
  3. -- execute the script within an object action with: launch_url()
  4.  
  5. function launch_url()
  6.  local result = startDefaultBrowser('https://visionaire-studio.net')
  7.  if result then
  8.   print('browser started - defined')
  9.  else
  10.   print('browser not started - defined')
  11.  end
  12. end
  13.  
  14. -- [launch_url_from_default_browser] (execution script - example two)
  15. -- call the script within an object action to use!
  16.  
  17. if startDefaultBrowser('https://visionaire-studio.net') then
  18.   print('browser started - executed')
  19. else
  20.   print('browser not started - executed')
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement