Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

HUD keyboard

Nemi Nagy
Registered User
Join date: 25 Mar 2007
Posts: 6
02-05-2008 04:22
Hi.

I started working on some HUD Keyboard for a guy the i know.
He had a stroke 2 years ago, and cant speak or write more then a 100 words,
he do understand all what there are being said to him etc..

anywyas... i was working on this to make it able for him to talk to others in SL.

What i wanted it to do was that it should work so you can press letteres and words to combine sentences, before sending it to the chat, but im not a master scripter or even close to.

i made some buttoms there can say something theres writting in a notecard, but cant figure out how to make it able to store the word and make it able o combine more words to it...

does anything what im writing making any sence..? im confused now..

anywyas... heres what i made so far..

//******************************************************

integer gLine = 0;
key gQueryID = NULL_KEY;
string gName = "Config";
string cText = "";
string SliceBefore(string str)
{
integer ix = llSubStringIndex(str, "=";);
return llGetSubString(str, 0, ix-1);
}
string SliceAfter(string str)
{
integer ix = llSubStringIndex(str, "=";);
if (ix == llStringLength(str) - 1)
return "";
else
return llGetSubString(str, ix+1, llStringLength(str) - 1);
}

ReloadNote()
{
//llOwnerSay("Loading notecard...";);
gLine = 0;
gQueryID = llGetNotecardLine(gName, gLine);
}

default
{
state_entry()
{
// start to read the notecard
string owner = llKey2Name( llGetOwner() );
ReloadNote();
llSetObjectName(owner);
}

changed(integer change)
{
if (change & CHANGED_INVENTORY) llResetScript();
}

dataserver(key query_id, string data)
{
if (query_id == gQueryID)
{
if (data != EOF)
{
if (llToUpper(llStringTrim(SliceBefore(data), STRING_TRIM)) == "CTEXT";)
cText = (key)llStringTrim(SliceAfter(data), STRING_TRIM);
++gLine;
gQueryID = llGetNotecardLine(gName, gLine);
}
else
{
llSetText(cText, <1,1,1>, 1.0);
}
}
}

touch_start(integer total_number)
{
llSay(0, cText);
}
}

//*******************************************************

and the notecard called "Config" without the ""

CTEXT = your text here

i would be more then happy if someone could help me out here :) and you will also make a non-talking man talk again :)
Pavcules Superior
Registered User
Join date: 30 Oct 2006
Posts: 69
02-05-2008 05:32
Hi Nemi,

I currently have a product that could do something similar to what you are achieving, plus in addition it can access the majority of SL menu options and shortcuts.

SLEK v2 is a Windows Application that also has a SL HUD display. When you press a button in the HUD will trigger a keyboard action. It could be used to do something similar to what you are achieving: http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=340255

I have also got a Free cut down version of the software as well, which is limited to 3 keys, but no HUD:
http://www.slexchange.com/modules.php?name=Marketplace&file=item&ItemID=327503

I also had a disabled customer as well who had problems using SL shortcuts due to the person not being able to press 2 keys at the same time. Although not the same situation as the guy you are helping, but SLEK did help them out.

Just IM me and we can chat about it more.