-
Check a render queue item exists or alert
I’m using the following statement in a script to display the filename of the (1) render queue output file.
var outputPath=app.project.renderQueue.item(1).outputModules[1].file.name.replace(/%20/g, “_”);
output = app.project.activeItem.layers.addText(outputPath);
Currently if the render queue item does not exist you get a script error – I would like to include a condition in the script which checks to see if the item exists and produces an alert if it doesn’t but am unsure as how to approach it.
Any advice or direction would be greatly appreciated
Thanks
John