Timelapse and displaying images automatically
Timelapse and displaying images automatically
Well this was bugging me so in typical fashion I did the opposite of what the scripting guide says &… Low and behold it works just fine. Rubbish that evalFile() and just plain old read() the dammed script file… You should be good to go…
Timelapse and displaying images automatically
larsen67 wrote:Well this was bugging me so in typical fashion I did the opposite of what the scripting guide says &… Low and behold it works just fine. Rubbish that evalFile() and just plain old read() the dammed script file… You should be good to go…
Thanks, Those scripting guides are .... well frustrating at the least.
Thanks, Those scripting guides are .... well frustrating at the least.
Timelapse and displaying images automatically
This has been running without issue now…
Code: Select all#target bridge
app.bringToFront();
var thisFile = new File('~/Desktop/ZIP_Test.jsx');
var thisScript = readScript(thisFile);
var thisTask = addTask(thisScript, 30000, true);
$.writeln(thisTask);
function readScript(f) {
f.open('r');
var thisScript = f.read();
f.close();
return thisScript;
}
function addTask(s, d, rpt) {
// Check some process is NOT already running?
if (!app.isProcessingJob()) {
app.bringToFront();
// Execute script? every delay? repeatedly?
var tID = app.scheduleTask(s, d, rpt);
return tID;
}
}
Code: Select all#target bridge
app.bringToFront();
var thisFile = new File('~/Desktop/ZIP_Test.jsx');
var thisScript = readScript(thisFile);
var thisTask = addTask(thisScript, 30000, true);
$.writeln(thisTask);
function readScript(f) {
f.open('r');
var thisScript = f.read();
f.close();
return thisScript;
}
function addTask(s, d, rpt) {
// Check some process is NOT already running?
if (!app.isProcessingJob()) {
app.bringToFront();
// Execute script? every delay? repeatedly?
var tID = app.scheduleTask(s, d, rpt);
return tID;
}
}