Difference between revisions of "Notecard Configuration Reader by Maddox Deluxe"

From Second Life Wiki
Jump to: navigation, search
Line 2: Line 2:
 
|background=#cdd
 
|background=#cdd
 
|bordercolor=#000
 
|bordercolor=#000
|First make a note card called (Category Theme).Fantasy and copy the data of this one into it. The 00000000-0000-0000-0000-000000000000 just means no floor drop. The error checking only works for the values, the command lines has no error checking yet.|
+
|First make a note card called (Category Theme).Fantasy and copy the data of this one into it. The 00000000-0000-0000-0000-000000000000 just means no floor drop.
 
}}  
 
}}  
 
<pre>
 
<pre>
// Our test note card
+
// our test notecard
+
[Author Name] = Maddox Deluxe
Author Name=Maddox Deluxe
+
+
 
// Theme [1]
 
// Theme [1]
Menu Button Name=Fantasy Tiger
+
[Menu Button Name] = Fantasy Tiger
BackDrop Texture UUID=8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
+
[BackDrop Texture UUID] = 8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
FloorDrop Texture UUID=00000000-0000-0000-0000-000000000000
+
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
+
 
// Theme [2]
 
// Theme [2]
Menu Button Name=Fantasy Car
+
[Menu Button Name] = Fantasy Car
BackDrop Texture UUID=517b2288-67ca-b14c-1de2-c5f5fdf5291f
+
[BackDrop Texture UUID] = 517b2288-67ca-b14c-1de2-c5f5fdf5291f
FloorDrop Texture UUID=00000000-0000-0000-0000-000000000000
+
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
+
 
// Theme [3]
 
// Theme [3]
Menu Button Name=Fantasy Tree
+
[Menu Button Name] = Fantasy Tree
BackDrop Texture UUID=f6321118-cc24-6230-78a5-a257a3e33378
+
[BackDrop Texture UUID] = f6321118-cc24-6230-78a5-a257a3e33378
FloorDrop Texture UUID=00000000-0000-0000-0000-000000000000
+
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
 
</pre>
 
</pre>
 
{{ColorPanel
 
{{ColorPanel
Line 30: Line 26:
 
}}  
 
}}  
 
<pre>
 
<pre>
// Optimized for faster loading
+
[Author Name] = Maddox Deluxe
Author Name=Maddox Deluxe
+
[Menu Button Name] = Fantasy Tiger
Menu Button Name=Fantasy Tiger
+
[BackDrop Texture UUID] = 8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
BackDrop Texture UUID=8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
+
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
FloorDrop Texture UUID=00000000-0000-0000-0000-000000000000
+
[Menu Button Name] = Fantasy Car
Menu Button Name=Fantasy Car
+
[BackDrop Texture UUID] = 517b2288-67ca-b14c-1de2-c5f5fdf5291f
BackDrop Texture UUID=517b2288-67ca-b14c-1de2-c5f5fdf5291f
+
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
FloorDrop Texture UUID=00000000-0000-0000-0000-000000000000
+
[Menu Button Name] = Fantasy Tree
Menu Button Name=Fantasy Tree
+
[BackDrop Texture UUID] = f6321118-cc24-6230-78a5-a257a3e33378
BackDrop Texture UUID=f6321118-cc24-6230-78a5-a257a3e33378
+
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
FloorDrop Texture UUID=00000000-0000-0000-0000-000000000000
+
 
</pre>
 
</pre>
 
{{ColorPanel
 
{{ColorPanel
Line 49: Line 44:
 
}}  
 
}}  
 
<lsl>
 
<lsl>
// Notecard Configuration Reader by Maddox Deluxe
+
// Notecard Multi-line entries Configuration Reader v1.1 by Maddox Deluxe
 
// This script is free; you can redistribute it and/or modify it
 
// This script is free; you can redistribute it and/or modify it
 
// Just read the comments on the script
 
// Just read the comments on the script
 +
 +
key NotecardQueryId;          // key name of the notecard
 +
key LineRequestID;            // notecard line count
 +
integer LineTotal;            // The number of lines in the notecard
 +
integer LineIndex;            // index for data read requests
 +
 +
string Author_Name = "";      // variable for setting author name
 +
string Menu_Button_Name = ""; // variable for setting menu button name to the themes list
 +
string Back_Drop_UUID = "";  // variable for setting backdrop uuid key to the themes list
 +
string Floor_Drop_UUID = "";  // variable for setting floor drop uuid key to the themes list
  
key notecardQueryId; //name key of the notecard
+
string data;                 // note card data
integer line; // note card line tracker
+
string GetNoteName;           // incoming note card name  
 
+
// Variables
+
list Themes;                 // our list database for testing
string Author_Name = "";
+
string Menu_Button_Name = "";
+
integer ThemesCount;         // counts how many themes they are in the note card configuration
string Back_Drop_UUID = "";
+
string Floor_Drop_UUID = "";
+
key User;                     // user tracker key
string data; // note card data
+
string GetNoteName; // incoming note card name  
+
// function by Maddox Deluxe  
 
+
// test to dump all 3 elements in the list that goes with each other
list Themes; // our list database for testing
+
 
+
integer ThemesCount; // counts how many themes they are in the note card configuration
+
 
+
key User; // user tracker key
+
 
+
// Function by Maddox Deluxe
+
// test to dump all 3 elements in the list that goes with each other.
+
 
DumpListFind(list db, string name)
 
DumpListFind(list db, string name)
 
{
 
{
Line 78: Line 75:
 
         {
 
         {
 
             list Found = llList2List(db, index, index + 2);  
 
             list Found = llList2List(db, index, index + 2);  
           
+
 
             string BN = llList2String(Found,0);   
 
             string BN = llList2String(Found,0);   
 
             string BD = llList2String(Found,1);
 
             string BD = llList2String(Found,1);
 
             string FD = llList2String(Found,2);
 
             string FD = llList2String(Found,2);
           
+
             llOwnerSay("Dump testing for list database search.\nButton Name: "+(string)BN+ "\nBackdrop Texture: "+(string)BD+ "\nFloor drop Texture: "+(string)FD);
+
             llOwnerSay("Dump testing for list database search.\nAuthor Name: "+(string)Author_Name+ "\nButton Name: "+(string)BN+ "\nBackdrop Texture: "+(string)BD+ "\nFloor drop Texture: "+(string)FD);
           
+
 
     llOwnerSay("List Dump Found Test: "+llDumpList2String(Found, ","));
 
     llOwnerSay("List Dump Found Test: "+llDumpList2String(Found, ","));
           
+
 
   //  llMessageLinked(LINK_SET, 0,"SET BACKDROP TEXTURE",(string)BD);
 
   //  llMessageLinked(LINK_SET, 0,"SET BACKDROP TEXTURE",(string)BD);
 
             if(FD != "00000000-0000-0000-0000-000000000000")
 
             if(FD != "00000000-0000-0000-0000-000000000000")
Line 92: Line 89:
 
  //    llMessageLinked(LINK_SET, 0,"SET FLOOR DROP TEXTURE",(string)FD);
 
  //    llMessageLinked(LINK_SET, 0,"SET FLOOR DROP TEXTURE",(string)FD);
 
             }
 
             }
           
+
 
         }
 
         }
 
}
 
}
// Function by Maddox Deluxe
+
// function by Maddox Deluxe  
 
// looks for 3 elements and the search string is the first element of the set
 
// looks for 3 elements and the search string is the first element of the set
 
integer IsElement(list db, string search)
 
integer IsElement(list db, string search)
Line 103: Line 100:
 
         {
 
         {
 
             list Found = llList2List(db, index, index + 2);  
 
             list Found = llList2List(db, index, index + 2);  
           
+
             string i = llList2String(Found,0);   
+
             string str = llList2String(Found,0);   
             if (i == search)  
+
             if (str == search)  
 
             return TRUE; // was found
 
             return TRUE; // was found
 
         }
 
         }
 
         return FALSE; // was not found
 
         return FALSE; // was not found
}
+
}
// just for testing on this demo script to check keys
+
// Checks the uuid keys in the notecard, making sure they are real keys
integer isKey(key test)  
+
integer isKey(key check)  
 
{
 
{
     if (llStringLength(test) != 36)
+
     if (llStringLength(check) != 36)
 
         return FALSE;
 
         return FALSE;
       
+
 
+
 
     // Hyphenation test:
 
     // Hyphenation test:
     if  (    (llGetSubString(test, 8, 8) != "-")
+
     if  (    (llGetSubString(check, 8, 8) != "-")
           ||  (llGetSubString(test, 13, 13) != "-")
+
           ||  (llGetSubString(check, 13, 13) != "-")
           ||  (llGetSubString(test, 18, 18) != "-")
+
           ||  (llGetSubString(check, 18, 18) != "-")
           ||  (llGetSubString(test, 23, 23) != "-"))
+
           ||  (llGetSubString(check, 23, 23) != "-"))
 
             return FALSE;
 
             return FALSE;
           
+
 
     // Remove dashes
 
     // Remove dashes
     test = llDeleteSubString(llDeleteSubString(llDeleteSubString(llDeleteSubString((string)test, 8, 8), 12, 12), 16, 16), 20, 20);
+
     check = llDeleteSubString(llDeleteSubString(llDeleteSubString(llDeleteSubString((string)check, 8, 8), 12, 12), 16, 16), 20, 20);
 
     // Hex test
 
     // Hex test
 
     integer i;
 
     integer i;
 
     for (i = 0; i < 32; i+=4)  
 
     for (i = 0; i < 32; i+=4)  
 
     {
 
     {
         string char = llGetSubString(test, i, i+3 );
+
         string char = llGetSubString(check, i, i+3 );
 
         if ((integer)("0x"+char) == 0 && char != "0000")  
 
         if ((integer)("0x"+char) == 0 && char != "0000")  
 
             return FALSE;
 
             return FALSE;
Line 136: Line 133:
 
     return TRUE; // Passed all tests
 
     return TRUE; // Passed all tests
 
}
 
}
// note card loader
+
// notecard initialization
 
NoteCardInit(string GrabNoteCardName, key id) // key id could be use for dialog message or llInstantMessage
 
NoteCardInit(string GrabNoteCardName, key id) // key id could be use for dialog message or llInstantMessage
 
{
 
{
Line 144: Line 141:
 
   return;   
 
   return;   
 
     }
 
     }
     Themes = [];// clear the themes list
+
    LineRequestID = llGetNumberOfNotecardLines(GetNoteName); // total number of lines in the notecard
     line = 0; //start reading from first line 0
+
     Themes = [];     // clear the themes list
     ThemesCount = 0; // counts how many themes they are
+
     LineIndex = 0;   // start reading from line 0
     notecardQueryId = llGetNumberOfNotecardLines(GetNoteName);
+
     ThemesCount = 0; // start adding from 0
 +
     NotecardQueryId = llGetNotecardLine(GetNoteName, LineIndex);
 
     llInstantMessage(id,"Please stand by, reading themes configuration for " +GetNoteName);
 
     llInstantMessage(id,"Please stand by, reading themes configuration for " +GetNoteName);
 
}
 
}
 
+
 
ProcessThemes(string data, key id) // key id could be use for dialog message or llInstantMessage
 
ProcessThemes(string data, key id) // key id could be use for dialog message or llInstantMessage
 
{
 
{
Line 156: Line 154:
 
string cmd_grab;
 
string cmd_grab;
 
string value;
 
string value;
 
+
ThemesCount;
 +
 
//  if we are at the end of the file
 
//  if we are at the end of the file
 
     if(data == EOF)
 
     if(data == EOF)
 
     {
 
     {
 
         llInstantMessage(id,"Done reading themes configuration for "+GetNoteName+ "\n\nTotal Themes: "+(string)ThemesCount);
 
         llInstantMessage(id,"Done reading themes configuration for "+GetNoteName+ "\n\nTotal Themes: "+(string)ThemesCount);
        // lets use the 2nd search string for this test. The search strings are the button names in the note card configuration.
 
        string search_test = "Fantasy Car";
 
 
          
 
          
         if(IsElement(Themes,search_test)==TRUE)
+
        // lets use the 2nd search string for this test, the search strings are the button names in the notecard configuration
 +
         if(IsElement(Themes,"Fantasy Car")==TRUE)
 
         {
 
         {
           DumpListFind(Themes,search_test);
+
           DumpListFind(Themes,"Fantasy Car");
 
           return;
 
           return;
 
         }
 
         }
Line 174: Line 172:
 
         if(data != "")
 
         if(data != "")
 
         {
 
         {
             if ( llGetSubString(data, 0, 0) != "//" && llStringTrim(data, STRING_TRIM) != "" )
+
            // lets move on and read the next line
 +
            NotecardQueryId = llGetNotecardLine(GetNoteName, ++LineIndex);
 +
           
 +
            // cut off any leading blanks
 +
            // ignore blank or comment lines
 +
             if (llGetSubString(data, 0, 1) != "//" && llStringTrim(data, STRING_TRIM) != "" )
 
             {
 
             {
 
             cmd = llParseString2List(data, ["="], []);
 
             cmd = llParseString2List(data, ["="], []);
 
             cmd_grab = llStringTrim(llToLower(llList2String(cmd, 0)),STRING_TRIM);
 
             cmd_grab = llStringTrim(llToLower(llList2String(cmd, 0)),STRING_TRIM);
 
             value = llStringTrim(llList2String(cmd, 1), STRING_TRIM);
 
             value = llStringTrim(llList2String(cmd, 1), STRING_TRIM);
 
+
   
             if(cmd_grab == "author name")
+
             if(cmd_grab == "[author name]")
 
             {
 
             {
 
             Author_Name = value;
 
             Author_Name = value;
 
             // error checking for Author Name
 
             // error checking for Author Name
            if(value == "")
+
            if(value == "")
 
             {
 
             {
              llInstantMessage(id,"Themes Configuration Error on line: " +(string)line+ ". Author Name can not be empty.");
+
            llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Author Name can not be empty.");
            return;
+
            return;
 
             }
 
             }
 
           }
 
           }
 
             else
 
             else
             if(cmd_grab == "menu button name")
+
             if(cmd_grab == "[menu button name]")
 
             {
 
             {
 
             Menu_Button_Name = value;
 
             Menu_Button_Name = value;
Line 197: Line 200:
 
             if(value == "")
 
             if(value == "")
 
             {
 
             {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)line+ ". Menu Button Name can not be empty.");
+
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Menu Button Name can not be empty.");
 
             return;
 
             return;
 
             }
 
             }
 
             }
 
             }
 
             else
 
             else
             if(cmd_grab == "backdrop texture uuid")
+
             if(cmd_grab == "[backdrop texture uuid]")
 
             {
 
             {
 
             Back_Drop_UUID = value;
 
             Back_Drop_UUID = value;
Line 208: Line 211:
 
             if(value == "" || (isKey(llToLower((string)value)) != TRUE))
 
             if(value == "" || (isKey(llToLower((string)value)) != TRUE))
 
             {
 
             {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)line+ ". (1) The Backdrop Texture UUID is empty. (2) The Backdrop UUID is not a key.");
+
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Backdrop Texture UUID is empty. (2) The Backdrop UUID is not a key.");
 
             return;
 
             return;
 
             }
 
             }
 
           }
 
           }
 
             else
 
             else
             if(cmd_grab == "floordrop texture uuid")
+
             if(cmd_grab == "[floordrop texture uuid]")
 
             {
 
             {
 
             Floor_Drop_UUID = value;
 
             Floor_Drop_UUID = value;
Line 219: Line 222:
 
             if(value == "" || (isKey(llToLower((string)value)) != TRUE))
 
             if(value == "" || (isKey(llToLower((string)value)) != TRUE))
 
             {
 
             {
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)line+ ". (1) The Floor-drop Texture UUID is empty. (2) The Floor-drop UUID is not a key.");
+
             llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Floor-drop Texture UUID is empty. (2) The Floor-drop UUID is not a key.");
 
             return;
 
             return;
 
             }
 
             }
 
+
            ThemesCount = ThemesCount +1; // add +1 to our themes count
 +
        }
 
// add to our test list database
 
// add to our test list database
 
Themes += [Menu_Button_Name,Back_Drop_UUID,Floor_Drop_UUID];
 
Themes += [Menu_Button_Name,Back_Drop_UUID,Floor_Drop_UUID];
ThemesCount = ThemesCount + 1; // we don't count the note lines
 
 
           }
 
           }
 
         }
 
         }
 
     }  
 
     }  
    // lets move on to the next lines in our note card configuration
 
    ++line;
 
    notecardQueryId = llGetNotecardLine(GetNoteName, line);
 
}
 
// we don't need a state entry to run this script, best thing is you don't even have to reset the script at all.
 
 
 
default
 
default
 
{
 
{
 
+
 
link_message(integer sender_num, integer num, string str, key id)
 
link_message(integer sender_num, integer num, string str, key id)
 
{
 
{
Line 247: Line 244:
 
if(str == "LoadThemes")  
 
if(str == "LoadThemes")  
 
{
 
{
// loads up our test note card
+
// loads up our test notecard
 
GetNoteName = id;
 
GetNoteName = id;
 
NoteCardInit((string)GetNoteName, User);
 
NoteCardInit((string)GetNoteName, User);
 
   }     
 
   }     
 
  }
 
  }
//  Triggered when task receives asynchronous data
+
//  triggered when task receives asynchronous data
 
  dataserver(key request_id, string data)
 
  dataserver(key request_id, string data)
 
   {
 
   {
   if(request_id == notecardQueryId)
+
   if(request_id == NotecardQueryId)
 
   {
 
   {
 
   ProcessThemes(data, User);
 
   ProcessThemes(data, User);
 
   }
 
   }
 
 
  }
 
  }
}
 
</lsl>
 
{{ColorPanel
 
|background=#cdd
 
|bordercolor=#000
 
|Our script that will load the note card is called (CODE).Notecard.Tester|
 
}}
 
<lsl>
 
// Our test script for loading the notecard
 
// place this script with the main note card one and then just click the object
 
 
// our test notecard name for reading
 
string NotecardName = "(Category Theme).Fantasy";
 
 
default
 
{
 
    state_entry()
 
    {
 
     
 
    }
 
 
    touch_start(integer total_number)
 
    {
 
    key User = llDetectedKey(0); // sets the user key
 
    // sending user key to the note card reader script
 
    llMessageLinked(LINK_SET,0,"SetUserKey",User);
 
 
    // sending the note card name to the note card reader script
 
    llMessageLinked(LINK_SET,0,"LoadThemes",(string)NotecardName);
 
    }
 
 
}
 
}
 
</lsl>
 
</lsl>
Line 297: Line 263:
 
---------------
 
---------------
 
Dump testing for list database search.
 
Dump testing for list database search.
 +
Author Name: Maddox Deluxe
 
Button Name: Fantasy Car
 
Button Name: Fantasy Car
Backdrop Texture: 517b2288-67ca-b14c-1de2-c5f5fdf5291f
+
Backdrop Texture: 8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
 
Floor drop Texture: 00000000-0000-0000-0000-000000000000
 
Floor drop Texture: 00000000-0000-0000-0000-000000000000
  
List Dump Found Test: Fantasy Car,517b2288-67ca-b14c-1de2-c5f5fdf5291f,00000000-0000-0000-0000-000000000000
+
List Dump Found Test: Fantasy Car,8f304cf2-7120-24e2-d1f1-db6b31bd6f6c,00000000-0000-0000-0000-000000000000
 
</pre>
 
</pre>

Revision as of 20:00, 22 April 2014

First make a note card called (Category Theme).Fantasy and copy the data of this one into it. The 00000000-0000-0000-0000-000000000000 just means no floor drop.

Content here. More content.


// our test notecard
[Author Name] = Maddox Deluxe
// Theme [1]
[Menu Button Name] = Fantasy Tiger
[BackDrop Texture UUID] = 8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
// Theme [2]
[Menu Button Name] = Fantasy Car
[BackDrop Texture UUID] = 517b2288-67ca-b14c-1de2-c5f5fdf5291f
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
// Theme [3]
[Menu Button Name] = Fantasy Tree
[BackDrop Texture UUID] = f6321118-cc24-6230-78a5-a257a3e33378
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
If you like to make it faster for loading then just make it like this

[Author Name] = Maddox Deluxe
[Menu Button Name] = Fantasy Tiger
[BackDrop Texture UUID] = 8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
[Menu Button Name] = Fantasy Car
[BackDrop Texture UUID] = 517b2288-67ca-b14c-1de2-c5f5fdf5291f
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
[Menu Button Name] = Fantasy Tree
[BackDrop Texture UUID] = f6321118-cc24-6230-78a5-a257a3e33378
[FloorDrop Texture UUID] = 00000000-0000-0000-0000-000000000000
Our main script called (CODE).Notecard.Reader
  • very fast note card reader

<lsl> // Notecard Multi-line entries Configuration Reader v1.1 by Maddox Deluxe // This script is free; you can redistribute it and/or modify it // Just read the comments on the script

key NotecardQueryId; // key name of the notecard key LineRequestID; // notecard line count integer LineTotal; // The number of lines in the notecard integer LineIndex; // index for data read requests

string Author_Name = ""; // variable for setting author name string Menu_Button_Name = ""; // variable for setting menu button name to the themes list string Back_Drop_UUID = ""; // variable for setting backdrop uuid key to the themes list string Floor_Drop_UUID = ""; // variable for setting floor drop uuid key to the themes list

string data; // note card data string GetNoteName; // incoming note card name

list Themes; // our list database for testing

integer ThemesCount; // counts how many themes they are in the note card configuration

key User; // user tracker key

// function by Maddox Deluxe // test to dump all 3 elements in the list that goes with each other DumpListFind(list db, string name) {

integer index = llListFindList(db, [name]);
       if (~index)
       {
           list Found = llList2List(db, index, index + 2); 

           string BN = llList2String(Found,0);   
           string BD = llList2String(Found,1);
           string FD = llList2String(Found,2);

           llOwnerSay("Dump testing for list database search.\nAuthor Name: "+(string)Author_Name+ "\nButton Name: "+(string)BN+ "\nBackdrop Texture: "+(string)BD+ "\nFloor drop Texture: "+(string)FD);

   llOwnerSay("List Dump Found Test: "+llDumpList2String(Found, ","));

 //  llMessageLinked(LINK_SET, 0,"SET BACKDROP TEXTURE",(string)BD);
           if(FD != "00000000-0000-0000-0000-000000000000")
           {
//    llMessageLinked(LINK_SET, 0,"SET FLOOR DROP TEXTURE",(string)FD);
           }

       }

} // function by Maddox Deluxe // looks for 3 elements and the search string is the first element of the set integer IsElement(list db, string search) {

integer index = llListFindList(db, [search]);
       if (~index)
       {
           list Found = llList2List(db, index, index + 2); 

           string str = llList2String(Found,0);   
           if (str == search) 
           return TRUE; // was found
       }
       return FALSE; // was not found
}

// Checks the uuid keys in the notecard, making sure they are real keys integer isKey(key check) {

   if (llStringLength(check) != 36)
       return FALSE;


   // Hyphenation test:
   if  (     (llGetSubString(check, 8, 8) != "-")
         ||  (llGetSubString(check, 13, 13) != "-")
         ||  (llGetSubString(check, 18, 18) != "-")
         ||  (llGetSubString(check, 23, 23) != "-"))
           return FALSE;

   // Remove dashes
   check = llDeleteSubString(llDeleteSubString(llDeleteSubString(llDeleteSubString((string)check, 8, 8), 12, 12), 16, 16), 20, 20);
   // Hex test
   integer i;
   for (i = 0; i < 32; i+=4) 
   {
       string char = llGetSubString(check, i, i+3 );
       if ((integer)("0x"+char) == 0 && char != "0000") 
           return FALSE;
   }
   return TRUE; // Passed all tests

} // notecard initialization NoteCardInit(string GrabNoteCardName, key id) // key id could be use for dialog message or llInstantMessage {

 if(llGetInventoryType(GrabNoteCardName) != INVENTORY_NOTECARD)
   {
 llInstantMessage(id,"Theme note card was not found "+(string)GrabNoteCardName+".");
  return;   
   }
   LineRequestID = llGetNumberOfNotecardLines(GetNoteName); // total number of lines in the notecard
   Themes = [];      // clear the themes list
   LineIndex = 0;    // start reading from line 0
   ThemesCount = 0;  // start adding from 0
   NotecardQueryId = llGetNotecardLine(GetNoteName, LineIndex);
   llInstantMessage(id,"Please stand by, reading themes configuration for " +GetNoteName);

}

ProcessThemes(string data, key id) // key id could be use for dialog message or llInstantMessage { list cmd; string cmd_grab; string value; ThemesCount;

// if we are at the end of the file

   if(data == EOF)
   {
       llInstantMessage(id,"Done reading themes configuration for "+GetNoteName+ "\n\nTotal Themes: "+(string)ThemesCount);
        
        // lets use the 2nd search string for this test, the search strings are the button names in the notecard configuration
        if(IsElement(Themes,"Fantasy Car")==TRUE)
        {
         DumpListFind(Themes,"Fantasy Car");
         return;
        }
        else
        return;
        }
        if(data != "")
        {
            // lets move on and read the next line
            NotecardQueryId = llGetNotecardLine(GetNoteName, ++LineIndex);
           
           // cut off any leading blanks
           // ignore blank or comment lines
           if (llGetSubString(data, 0, 1) != "//" && llStringTrim(data, STRING_TRIM) != "" )
           {
           cmd = llParseString2List(data, ["="], []);
           cmd_grab = llStringTrim(llToLower(llList2String(cmd, 0)),STRING_TRIM);
           value = llStringTrim(llList2String(cmd, 1), STRING_TRIM);
   
            if(cmd_grab == "[author name]")
            {
            Author_Name = value;
           // error checking for Author Name
           if(value == "")
            {
           llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Author Name can not be empty.");
           return;
            }
          }
           else
           if(cmd_grab == "[menu button name]")
           {
           Menu_Button_Name = value;
           // error checking for Menu Button Name
           if(value == "")
           {
            llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". Menu Button Name can not be empty.");
            return;
            }
           }
           else
           if(cmd_grab == "[backdrop texture uuid]")
           {
           Back_Drop_UUID = value;
           // error checking for BackDrop Texture UUID
           if(value == "" || (isKey(llToLower((string)value)) != TRUE))
           {
            llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Backdrop Texture UUID is empty. (2) The Backdrop UUID is not a key.");
            return;
            }
          }
           else
           if(cmd_grab == "[floordrop texture uuid]")
           {
           Floor_Drop_UUID = value;
           // error checking for FloorDrop Texture UUID
           if(value == "" || (isKey(llToLower((string)value)) != TRUE))
           {
            llInstantMessage(id,"Themes Configuration Error on line: " +(string)LineIndex+ ". (1) The Floor-drop Texture UUID is empty. (2) The Floor-drop UUID is not a key.");
           return;
           }
           ThemesCount = ThemesCount +1; // add +1 to our themes count
       }

// add to our test list database Themes += [Menu_Button_Name,Back_Drop_UUID,Floor_Drop_UUID];

          }
       }
   } 

default {

link_message(integer sender_num, integer num, string str, key id) { if(str == "SetUserKey") { // sets up the user key that click the object User = (key)id; } if(str == "LoadThemes") { // loads up our test notecard GetNoteName = id; NoteCardInit((string)GetNoteName, User);

 }    
}

// triggered when task receives asynchronous data

dataserver(key request_id, string data)
 {
 if(request_id ==  NotecardQueryId)
  {
  ProcessThemes(data, User);
  }
}

} </lsl>

Test Run Output
---------------
Dump testing for list database search.
Author Name: Maddox Deluxe
Button Name: Fantasy Car
Backdrop Texture: 8f304cf2-7120-24e2-d1f1-db6b31bd6f6c
Floor drop Texture: 00000000-0000-0000-0000-000000000000

List Dump Found Test: Fantasy Car,8f304cf2-7120-24e2-d1f1-db6b31bd6f6c,00000000-0000-0000-0000-000000000000