3

I have a line of code as below

app.system("cmd.exe python D:\project\PStest.py"); 

This is to run a python script from within photoshop. The similar question is asked here already and I followed the same Use Photoshop JavaScript to Execute System Command Line Prompt

When I execute the above code I get an error as

Error 24: app.system is not a function.

1 Answer 1

1

I got that error while in ExtendedScript tool with the wrong environement.

I never manadge to get the app.system() command to work with:

#target photoshop
app.system( "python  C:\ps_test.py"); 

the cmd window popup and close right away, nothing happens. If you know the right way to write it.

A workaround I found as a beginner.

#target photoshop
var bat = new File("C:/ps_test.bat");
bat.execute();
Sign up to request clarification or add additional context in comments.

1 Comment

did you try system("python xxx") ? seems like the system by itself works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.