Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Novice Question: Displaying a clickable link in chat?

Sway Schism
Registered User
Join date: 4 Aug 2008
Posts: 3
10-13-2009 01:53
I'm an extremely novice scripter and I have a script that will send green text to chat (exactly as I'd like), but unfortunately, the link I'd like to have clickable is also green text, forcing people to copy and paste it in order to click it. Is there any way I can alter the following script in order to have it properly display my group as a clickable link?

list buttons = ["Join","Cancel"];
integer channel = 77;
string mes = "";

default
{
state_entry()
{
llListen(channel,"", "","";);
}
touch_start(integer total_number)
{
llDialog(llDetectedKey(0),"GEEK BOUTIQUE:// Updates Group\n\nPlease click Join in order to...er, join!",buttons,channel);

}
listen(integer chan, string name, key id, string mes)
{
if (mes == "Join";)
{
llInstantMessage(id, "Copy/paste, then click the following link in order to join the GEEK BOUTIQUE:// Updates Group and access awesome freebies, cheapies, and product updates: " + "secondlife:///app/group/ab6568f4-5426-40a7-a83a-e793c883a8c9/about";);
mes = "";
}
else
{
}
}
}
Pete Littlebird
Registered User
Join date: 30 Sep 2009
Posts: 44
10-13-2009 03:13
http://wiki.secondlife.com/wiki/Open_Group_Join might help.
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
10-13-2009 04:09
The viewer code that linkifies text in the history window isn't very smart, the unusual punctuation in your shop name is confusing it. If you add a space to the shop name, like "GEEK BOUTIQUE: //", that will be enough to let it work.
Haravikk Mistral
Registered User
Join date: 8 Oct 2005
Posts: 2,482
10-13-2009 05:19
Forgive my ignorance in this, but will that provide a masked link? Like "Click this" could point to http://haravikk.com or something? Where is this feature documented?
_____________________
Computer (Mac Pro):
2 x Quad Core 3.2ghz Xeon
10gb DDR2 800mhz FB-DIMMS
4 x 750gb, 32mb cache hard-drives (RAID-0/striped)
NVidia GeForce 8800GT (512mb)
Viktoria Dovgal
Join date: 29 Jul 2007
Posts: 3,593
10-13-2009 06:11
No, there is nothing fancy like that, there is just a simple pattern match that will try to turn anything that looks URL-ish into a clickable link.

In this case the viewer was seeing BOUTIQUE:// as an invalid URI scheme, so it stopped trying to parse the line.
Sway Schism
Registered User
Join date: 4 Aug 2008
Posts: 3
10-13-2009 09:52
Argh, I knew it'd be something embarrassingly simple! Thank you so much, Viktoria!