Skip to main content
nermie
Known Participant
December 26, 2022
Question

Photoshop not recognising .py (python) file in script>browse.

  • December 26, 2022
  • 3 replies
  • 1566 views

I have a python script for Photoshop, a .py file. The instructions to use this file with Photoshop were to go to File>Script>Browse to load the file. When I do this I can see the .py file but it is greyed out and not recognised as a valid script file.

 

Should PS see these .py file as scripts and If so, what is going wrong here.

 

I an using a Mac with lateset OS and latest version of PS Creative Cloud.

 

I hope someone can solve this problem for me.

 

This topic has been closed for replies.

3 replies

Bojan Živković11378569
Community Expert
Community Expert
December 27, 2022

I will tag some more experienced scripters @r-bin @c.pfaffenbichler @Stephen Marsh 

nermie
nermieAuthor
Known Participant
December 27, 2022

thanks

 

 

c.pfaffenbichler
Community Expert
Community Expert
January 4, 2023
Legend
December 27, 2022

Hello @nermie,

 

I don't think you can run a .py file directly from Photoshop, I think Applescript needs to be used as a bridge between PS and the .py file.

https://github.com/lohriialo/photoshop-scripting-python

https://github.com/lohriialo/photoshop-scripting-python/tree/master/mac_scripting

 

Regards,

Mike

 

nermie
nermieAuthor
Known Participant
December 27, 2022

Thanks, I think you are correct. See my response above to Michelle in thread.

mglush
Community Expert
Community Expert
December 27, 2022

Hi!

Just wanted to check first--Did you put your script into the Preset>Scripts folder?

Michelle

nermie
nermieAuthor
Known Participant
December 27, 2022

No, the advice I was goven is just browse for the file at its location. In my case this was the desktop. I can give the presets folder a try but before I do this, I need to look at my other response which seems to indicate that .py files cannot be read directly.

THanks

 

mglush
Community Expert
Community Expert
December 27, 2022

Hi!

Here is an article I found that might be helpful. It is dated in 2018, but hopefully the information will still be relevant.

https://lacuisine.tech/execute-python-script-from-photoshop/

Let us know if you are successful!

Michelle