
Originally Posted by
Fraggie
This quote is hidden because you are
ignoring this member.
Show
Wat heb je juist gedaan? Kwestie van hier geen nutteloze thread van te maken.
Klasse readtheme:
Code:
export prototype LIST ReadTheme();
function LIST ReadTheme()
LIST listID;
begin
// Create a string list.
listID = ListCreate (STRINGLIST);
// If an error occurred, report it; then terminate.
if (listID = LIST_NULL) then
MessageBox ("Unable to create list.", SEVERE);
abort;
endif;
// Read the file into a string list.
if (ListReadFromFile (listID, OLD_FILE) < 0) then
// Report ListReadFromFile failure.
MessageBox ("Unable to read" + OLD_FILE + ".", SEVERE);
else
return listID;
endif;
end;
Klasse findValue:
Code:
export prototype STRING FindValueTheme(LIST,STRING);
function STRING FindValueTheme(appTheme,key)
string value,svString,result;
int nResult,helper;
LIST tokenlist;
begin
nResult = ListGetFirstString ( appTheme , svString );
while(nResult!= END_OF_LIST)
helper=StrFindEx ( svString , key+"=" , 0);
if(helper>=0)then
tokenlist= ListCreate (STRINGLIST);
StrGetTokens(tokenlist,svString,"=");
ListSetIndex ( tokenlist , 2 );
ListCurrentString ( tokenlist , result );
nResult= END_OF_LIST;
else
nResult=ListGetNextString ( appTheme , svString );
endif;
endwhile;
return result;
end;
Maar het gaat ook via loadconfigfile en configfind
ConfigFind Example