Difference between revisions of "LlLoadURL"

From Second Life Wiki
Jump to: navigation, search
m
(I prefer the ietf rfc archive (better coloring and document links); the template makes it easier.)
Line 5: Line 5:
 
|p2_type=string|p2_name=message
 
|p2_type=string|p2_name=message
 
|p3_type=string|p3_name=url
 
|p3_type=string|p3_name=url
|func_footnote=The '''url''' is truncated to 255 characters and '''message''' is truncated to 254 characters.<br/>The protocol for the '''url''' must be specified, currently only "https://" and "http://" are supported.<br/>The URL should be [http://rfc.dotsrc.org/rfc/rfc1738.html rfc1738] compliant with proper escapes.
+
|func_footnote=The '''url''' is truncated to 255 characters and '''message''' is truncated to 254 characters.<br/>The protocol for the '''url''' must be specified, currently only "https://" and "http://" are supported.<br/>The URL should be {{RFC|1738}} compliant with proper escapes.
 
|func_desc=Shows dialog to '''avatar''' offering to load web page at '''url''' with '''message'''.<br/>If user clicks yes, launches the page in their web browser, starting the browser if required.
 
|func_desc=Shows dialog to '''avatar''' offering to load web page at '''url''' with '''message'''.<br/>If user clicks yes, launches the page in their web browser, starting the browser if required.
 
|return_text
 
|return_text

Revision as of 17:42, 24 August 2009

Summary

Function: llLoadURL( key avatar, string message, string url );

Shows dialog to avatar offering to load web page at url with message.
If user clicks yes, launches the page in their web browser, starting the browser if required.

• key avatar avatar UUID that is in the same region
• string message
• string url

The url is truncated to 255 characters and message is truncated to 254 characters.
The protocol for the url must be specified, currently only "https://" and "http://" are supported.
The URL should be RFC-1738 compliant with proper escapes.

Caveats

  • This function causes the script to sleep for 10.0 seconds.
  • This function should not be called from group deeded objects[1], it will silently fail.
All Issues ~ Search JIRA for related Bugs

Examples

<lsl>// Display URL Dialog default {

   touch_start(integer num_detected)
   {
       key gAvatarKey = llDetectedKey(0);
       llLoadURL(gAvatarKey, "View the offical Second Life website.", "http://www.secondlife.com");
   }

}</lsl> <lsl> //Compact Script by Alessandro Spires to SecondBits and Second Life default {

  touch_start(integer num_detected)
  {
     llLoadURL(llDetectedKey(0), "Visit the Second Life", "http://www.secondlife.com");   
  }

}</lsl> <lsl>//Emmas Seetan //21 September 17:06

string text = "Visit the Second Life Wiki!"; //Floating text string url = "https://wiki.secondlife.com/"; //must include 'http://'

default {

   touch_start(integer num_detected)
   {
       llLoadURL(llDetectedKey(0), text, url); //Loads the URL
   }
}</lsl>

Deep Notes

History

  • Introduced in version 1.6, no support for group deeded objects.
  • As of version ~1.9, support for group deeded objects was added (possibly by accident).
  • In the server upgrade released on 2007-03-14, support for group deeded objects was removed.
Search JIRA for related Issues

Tests

• llLoadURL Test

Footnotes

  1. ^ This was not always the case, see History for details

Signature

function void llLoadURL( key avatar, string message, string url );