zzzz

Join us in Phaze Demesnes or follow us:

Home   Show All
Category: Contributor: Creator
Browser Browser_Launch_Script  

Browser_Launch_Script

Browser Launch Script.lsl

Category: Browser
By : Anonymous
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life + OpenSim

the Zip file

Download all files for Browser_Launch_Script
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Browser_Launch_Script_1.lsl
1
2 string card="bookmarks";
3 integer i=0;
4 integer pointer=0;
5 list URLs;
6 list Hover;
7 key owner;
8 integer listenID;
9
10 default
11 {
13 {
14 llSetText("Loading bookmarks", <1,1,1>, 1.0);
15 llGetNotecardLine(card, i);
16 owner=llGetOwner();
17 }
19 {
21 if(who==owner)
22 {
23 llDialog(owner, "Open URL or select new target?", ["Open", "Prev", "Next"], 1001);
24 llListenRemove(listenID);
25 listenID=llListen(1001, "", owner, "");
26 } else {
27 llLoadURL(llDetectedKey(0), "Load "+llList2String(Hover, pointer), llList2String(URLs, pointer));
28 }
29 }
31 {
32 if(data!=EOF)
33 {
34 list temp=llCSV2List(data);
35 Hover+=llList2String(temp, 0);
36 URLs+=llList2String(temp, 1);
37 i++;
38 llGetNotecardLine(card, i);
39 } else {
40 llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
41 }
42 }
43 listen(integer channel, string name, key ID, string message)
44 {
46 if(message=="Open")
47 {
48 llLoadURL(llGetOwner(), "Load "+llList2String(Hover, pointer), llList2String(URLs, pointer));
49 } else if(message=="Prev")
50 {
51 pointer++;
52 if(pointer==llGetListLength(Hover))
53 {
54 pointer=0;
55 }
56 } else if(message=="Next")
57 {
58 pointer--;
59 if(pointer<0)
60 {
61 pointer=llGetListLength(Hover);
62 pointer--;
63 }
64 }
65 llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
66 llListenRemove(listenID);
67 }
68 changed(integer change)
69 {
70 if(change & CHANGED_INVENTORY)
71 {
73 }
74 }
75 timer()
76 {
77 llListenRemove(listenID);
78 }
79 }// END //