<http://forum.pspad.com/read.php?f=2&i=12236&t=12236>
----------------------------------------------------------------
Hi all
I'm creating an update to my "Auto updating HTML" Javascript and am
trying to add the ability to update all HTML files within a project.
The problem is with the projectFiles() array. Every time I run the script,
PSPad reports "projectFiles is undefined". Is there a bug within the
project related commands or am I doing something wrong?
I have included the relevant function below:
function getfiles() {
var files=new Array();
var hf=0;
for (var pf=0; pf<projectFiles.length; pf++){
fnamel=projectFiles(pf).length;
fnameext=projectFiles(pf).substring(fnamel, fnamel-4);
if (fnameext=="html"||fnameext==".htm") {
if (projectFiles(pf).substring(fnamel, fnamel-12)!="include.html")
{
files(hf)=projectFiles(pf);
hf+=1;
}
}
}
return files;
}
Thanks in advance
Tim
--
PSPad freeware editor http://www.pspad.com