• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Notice open documents

Advocate ,
Aug 17, 2017 Aug 17, 2017

Copy link to clipboard

Copied

Good morning

Is there a way to warn that there are more than one open document in Photoshop?

If there is only an open document, no warning is required

If there are more open documents, a warning must be issued.

TOPICS
Actions and scripting

Views

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Aug 17, 2017 Aug 17, 2017

At which point is the warning supposed to happen?

When you (try to) open another image or as part of some process?

if (documents.length > 1) {alert ("more than one open image")}

Votes

Translate

Translate
Adobe
Community Expert ,
Aug 17, 2017 Aug 17, 2017

Copy link to clipboard

Copied

At which point is the warning supposed to happen?

When you (try to) open another image or as part of some process?

if (documents.length > 1) {alert ("more than one open image")}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 17, 2017 Aug 17, 2017

Copy link to clipboard

Copied

Thank you

And what I was looking for

Now I want to put it in a ScriptingListener

Should do this job

If there is more open documents nothing happens

If the document and one part the script or action.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 19, 2017 Aug 19, 2017

Copy link to clipboard

Copied

I do not understand your statement, please elaborate with the help of screenshots.

By »ScriptingListener« do you mean File > Scripts > Script Events Manager?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 19, 2017 Aug 19, 2017

Copy link to clipboard

Copied

c.pfaffenbichler

I managed to run it

Thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 21, 2017 Aug 21, 2017

Copy link to clipboard

Copied

Hi

Use the below code,

if (documents.length == 1) {

    // Post your ScriptingListener code Here !!!

    }

else{

    alert ("There is no document to use")

}

-yajiv

geppettol66959005  wrote

Thank you

And what I was looking for

Now I want to put it in a ScriptingListener

Should do this job

If there is more open documents nothing happens

If the document and one part the script or action.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Aug 21, 2017 Aug 21, 2017

Copy link to clipboard

Copied

LATEST

Thank you natrev

Just what I did

very kind

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines