Skip to main content
Participating Frequently
September 9, 2013
Answered

Execute() command not working on Photoshop CC

  • September 9, 2013
  • 2 replies
  • 4455 views

This code works perfectly on CS6 but not on CC. Any ideas on how to solve it?

var toGo = File(String("/Users/asouza/Documents/K3/test/test.log"));          

toGo.execute();

Thanks,

Alex

This topic has been closed for replies.
Correct answer Tom Ruark

My simple solution (thanks to Adobe team) was to clean up Photoshop Preferences.

All you have to do is to follow this video http://tv.adobe.com/watch/the-complete-picture-with-julieanne-kost/how-to-reset-photoshop-cs6s-preferences-file/ and reset all your preferences. Doing so, everything returns to normality.


This is a known problem with Photoshop CC and we have a solution in place for a future release. If you do any of the following, you will probably get into the "Permission denied" state. All ExtendScript engines can no longer myFile.execute(). Resetting preferences will get you out of that state.

File -> Browse in Bridge

File -> Generate -> Image Assets

(there may be other cases as well)

2 replies

Adobe Employee
September 18, 2013

Hi there,

Could you please check if the file extension name is clearly defined to be handled by the app you intended to? For example, on Mac, you could right click on the file, then select "Get Info", then expand the "Open with" section to see which app is currently handling it. On Win, you could also use "Default Programs" if your OS has it. Thanks.

Jon

d3mac123Author
Participating Frequently
September 18, 2013

Yes it is. This is the reason both CS6 and the ESTK can show the file. The issue is only happening when the .execute() is called from CC...

Adobe Employee
September 18, 2013

Could you be more specific on how do you call from CC? For example, you drag & drop the script onto CC, or browse it from File > Scripts > Browse..., or any other ways? Also please let me know what's your ESTK version. TIA.

Jon

Inspiring
September 9, 2013

Are you sure Photoshop CC is the reason it doesn't work? Did you check to make sure you have a valid file reference and persisson to execute( you may not if that is not your user account ).

The following opens the log file with Notepad on my system using CC

var f = new File('~/desktop/test.log');

f.execute();

d3mac123Author
Participating Frequently
September 10, 2013

For sure it is (at least seems to be the case on mine and other people that I know Mac - same issue is happening with CS5 as well but not on CS6). I have both installations in the same user account. Your example worked perfectly with CS6 but when I tried it at CC I got the "Permission denied" message. Any ideas on how to bypass this message and enable the code to run?

Participant
September 17, 2013

Did you find a solution?

I have the same problem when running a simple wrapper script that execute a more complicated python script:

File('d:/work/art_source/scripts/photoshop/textureexporter.py').execute()

The interesting part is that it works fine when staring a fresh instance of Photoshop CC. Same goes for Michael's example script. However, if i launch Bridge, i get the permission denied error until i restart photoshop and the scripts start working again. Mini bridge does not cause the problem.

Running 64 bit on windows 7.