Skip to main content
Known Participant
March 6, 2016
Answered

process documents up to 2048px

  • March 6, 2016
  • 1 reply
  • 540 views

I would like to create an alert window

when the document exceeds 2048px

ie if and less continuous 2048px with the photo processing

if it exceeds 2048px must exit the alert window that blocks processing

This topic has been closed for replies.
Correct answer pixxxelschubser

gionnyp9672044 schrieb:

… ie if and less continuous 2048px with the photo processing

if it exceeds 2048px must exit the alert window that blocks processing

Like you said:

if (app.activeDocument.width.as('px') <= 2048) {

    alert ("ready to processing");

    // your code

    } else {

    alert("more than 2048px");

}

Have fun

1 reply

pixxxelschubser
Community Expert
pixxxelschubserCommunity ExpertCorrect answer
Community Expert
March 6, 2016

gionnyp9672044 schrieb:

… ie if and less continuous 2048px with the photo processing

if it exceeds 2048px must exit the alert window that blocks processing

Like you said:

if (app.activeDocument.width.as('px') <= 2048) {

    alert ("ready to processing");

    // your code

    } else {

    alert("more than 2048px");

}

Have fun

Known Participant
March 6, 2016

I badly explained myself

if the document exceeds 2048px  must block the next action

pixxxelschubser
Community Expert
Community Expert
March 6, 2016

Yes.

This is exactly, what the script does (in my snippet only for the width of the active document).