need help >> ActiveXObject!!

Kitty82

New member
Joined
Sep 6, 2004
Messages
1
Hi!

I come from germany and so my english is very bad - but Ill try to explain my problem, that can anybody help me :?
I search help in german-forums, but nowbody wanted to helped me - i hope, you wont disappoint me too :cry:

My job is:

i have a JScript-File. I dont know really what it is do, but i have to add to a function, which check (only!!) all the filename (which are in the same folder like the script). It have to test if "settings.txt" embodied in the filename. If yes, it have to save the filename in a variable and then it will be finish-worked, if not the script have to test the next file on his filename. How can i code it??

I have a try, but I dont know if it is right:

var filesearch = "settings.txt";
var search_c = "<br>";
var filename, pos, pos_c, repeat;

var flist = ShowFolderFileList(folderspec);

repeat =1;
do{
pos_c = flist.indexOf(search_c, pos);
pos = flist.indexOf(filesearch, pos+1);

if(pos != -1 || pos_c != -1)
{
if(pos < pos_c)
{
filename = flist.slice(0, pos+12);
document.forms[0].input.value=filename;
}
else
{ filename = flist.slice(pos_c+4, pos+12); document.forms[0].input.value=filename;
}
}
else
{
repeat =0;
}

if(repeat == 1)
{
create_setupfile(filename); //the filename will be finished-worked

}

}while(repeat == 1);


Please - help me :oops:

Greetings
Kitty
 
Back
Top