Hi all, I'm doing some experiments in implementing a generic async function call in Extendscript (read setInterval and setTimeout). I have have a very rough example working in AI, PPro and AE but the script won't execute correctly in Photoshop. No errors, just doesn't seem to send the BridgeTalk message to itself. I know there are better ways to implement the function call etc, just want to get it working in Photoshop for now. Any ideas? var testLoop = function(str) { for(c = 0; c < 20; c++) { $.writeln(str + String(c)); $.sleep(100); } }; var setTimeout = function(fn, fnCall, timeOut) { targetApp = BridgeTalk.getSpecifier(BridgeTalk.appName); if( targetApp ) { var bt = new BridgeTalk; bt.target = targetApp; bt.body = fn.toString() + "; $.sleep(" + timeOut + "); " + fnCall + ";"; //bt.onResult = function(returnBtObj) { //$.writeln("returnMessage"); //}; bt.send(); } } $.writeln("MainThreadExecute A"); setTimeout(testLoop, "testLoop('Loop New Thread ')", 3000); $.writeln("MainThreadExecute B"); TNKS! G
... View more