Skip to main content
Participant
February 7, 2017
Question

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

  • February 7, 2017
  • 3 replies
  • 802 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.

3 replies

Participant
February 8, 2017

I also tried the Open Document option in the Scripts Event Manager and get the same results where the

app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

does not seem to get called, I have stripped the original script right back to just the two lines

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

app.activeDocument.close(SaveOptions.DONOTSAVECHANGES);

thinking it might have been an issue else where in the script but it still does the same thing.

Participant
February 8, 2017

Sorry on my part the Open Document option does work.

Participant
February 8, 2017

Yes I' am using the Start Application which I have set in the Scripts Event Manager, I have not used the open document option as I don't want the script to run every time I open a document.

JJMack
Community Expert
Community Expert
February 7, 2017

Are you sure you were using start application? l think you want to use an open event to trigger the script.

JJMack