Reputation: 8497
How do I check if any document is open in Photoshop?
Through Photoshop Script
I've tried activeDocument.length
, but it returns that activeDocument is not defined.
I wanted something like this:
if(documents.open === 0){
alert('NO DOCUMENT');
} else {
alert('DOCUMENT OPEN');
}
Upvotes: 0
Views: 1993
Reputation: 6967
Close, but no banana. You want
documents.length
See it here:
if (documents.length == 0)
{
alert("No files open to work with, dude!")
}
Upvotes: 3