Question
Waiting to receive a file object
Hi all.
I have code that imports a file into a project
var fileDepthSourceName = srtCarentFolder + "/Source_Crop.png"
app.project.activeItem.saveFrameToPng(0, File(fileDepthSourceName))
// $.sleep(5000)
f_ImportAsFootage(fileDepthSourceName, "Import");The last line of code sometimes throws an error.
If before the last line I put the line
$.sleep(5000)
then everything happens normally.
It seems like a string
f_ImportAsFootage(fileDepthSourceName, "Import");
call occurs before the file is created.
Is it possible to replace the string-- $.sleep(5000) ---
into an infinite loop, the exit from which is possible after receiving the object of this file?