Hi there,
sorry about my English, but I need some help for an alternate Text Path.
I am new in AFX Scripting, some trouble with the syntax.
I use this to Use an external text:
(WORKS FINE, but can't do all)
try{
myPath = "absolutpath/bla//textOne.txt";
$.evalFile(myPath);
eval(prod)[0];
}catch(err){
"MISSING";
}
now I want a second Path,
if the first will not work (delete, moved or other things) as alternattive Text.
The Output "MISSING" in case of no external Text had found is still important.
But i don't now how:
Perhaps like this (code is wrong - just the idea)
--> If first Text make an error, use other path.
(THIS DON'T WORK)
try{
myPath = "absolutpath/bla//textOne.txt";
$.evalFile(myPath);
eval(prod)[0];
}catch(err){
myPath = "absolutpath/bla//textTWO.txt";
$.evalFile(myPath);
eval(prod)[0];
}catch(err){
"MISSING";
}
other Idea, work with 'IF'
(THIS DON'T WORK)
try{
myPath = "absolutpath/bla//textOne.txt";
$.evalFile(myPath);
eval(prod)[0];
}
if (eval(prod)[0] == "" or eval(prod)[0] == undefined )
myPath = "absolutpath/bla//textTWO.txt";
$.evalFile(myPath);
eval(prod)[0];
}catch(err){
"MISSING";
}
thx a lot
Jekill