Timelapse and displaying images automatically

Discussion of Automation, Image Workflow and Raw Image Workflow

Moderators: Tom, Kukurykus

larsen67

Timelapse and displaying images automatically

Post by larsen67 »

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…
csuebele

Timelapse and displaying images automatically

Post by csuebele »

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.
larsen67

Timelapse and displaying images automatically

Post by larsen67 »

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;
   }
}
csuebele

Timelapse and displaying images automatically

Post by csuebele »

Thanks, I'll give this a try.

Chuck