-
app.scheduleTask()
Hi guys, happy monday to all!
I am trying to understand more about app.scheduleTask() so I set a quick script that creates a Temp folder in my desktop, then saves my current open project inside the folder and then I am trying to set a scheduleTask to delete the file and the folder after certain amount of time.
function tempFile(theFolder, theFile){
var folderPath, theFolder, filePath, theFile;folderPath = "~/Desktop/"+theFolder
theFolder = new Folder (folderPath.toString());
filePath = folderPath +"/"+ theFile + ".aep"
theFile = File(filePath.toString());theFolder.create()
app.project.save(theFile);var str = "theFile.remove();\
theFolder.remove();"app.scheduleTask(str,1000,false);
}tempFile("TempFld2", "test_002")
For some reason the app.scheduleTask is not finding the paths to the folder and file, it just doesnt want to look inside the variable, when I try this with an alert(), the file path comes as undefined. Am I missing something, is it because the app.scheduleTask is inside a function?
Thanks all for your help!
Fabio