You can add the following function to your Javascript code to easily retrieve these folder locations:
Code: Select all
function getiMacrosFolder(folderName)
{
var pname;
switch (folderName)
{
case "Macros" :
pname = "defsavepath";
break;
case "DataSources" :
pname = "defdatapath";
break;
case "Downloads" :
pname = "defdownpath";
break;
case "Logs" :
pname = "deflogpath";
break;
default :
throw folderName + " is not a valid iMacros folder name";
break;
}
return imns.Pref.getFilePref(pname).path;
}
Code: Select all
var downloadFolder = getiMacrosFolder("Downloads");