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 