Skip to main content
Participant
February 7, 2017
Answered

Runnnig script on photoshop CC2017 startup app.activeDocument.close does not work

  • February 7, 2017
  • 2 replies
  • 416 views

I' am using Photoshop CC 2017 and I have a script which I have set via the events manager to run on Start Application

//This part of the script no longer works in 2017

app.load(File ("C:/MyTools/Photoshop/scripts/images/setup.jpg"));

app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

The file opens up but it seems that the "app.activeDocument.close" does not work when the script is run when the application starts. If I run the same script manually via the "File > Scripts > browse" it works fine and the "app.activeDocument.close" works.

Does Photoshop CC 2017 run scripts differently when being run on Start Applictaion, I have had this script working fine in CS6, CC2015 and CC2015.5.

Any help or ideas why this would not work in CC2017 would be greatly appreciated.

Nigel

This topic has been closed for replies.
Correct answer c.pfaffenbichler

You may want to post here:

Photoshop Scripting

But aside from that you could wrap the line in an if- or try-clause. 

2 replies

Participant
February 7, 2017

I have tried using wrapping the line in an if but still did not work.

The part I don't understand is why it works when you manually run the script it works.

c.pfaffenbichler
Community Expert
Community Expert
February 7, 2017

What was the condition you used in the if-clause?

The part I don't understand is why it works when you manually run the script it works.

What is the complete Script?

But like I said before you may want to post on the Photoshop Scripting Forum.

c.pfaffenbichler
Community Expert
c.pfaffenbichlerCommunity ExpertCorrect answer
Community Expert
February 7, 2017

You may want to post here:

Photoshop Scripting

But aside from that you could wrap the line in an if- or try-clause.