lohriialo/photoshop-scripting-python

Mac Scripting guide suggestion

smlbiobot opened this issue · 2 comments

I’m trying to follow your mac scripting guide. https://github.com/lohriialo/photoshop-scripting-python/tree/master/mac_scripting

In usage:

from appscript import *

psApp = app('/Applications/Adobe Photoshop CC 2018/Adobe Photoshop CC 2018.app')
psApp.open(mactypes.Alias(file_name))

What file_name is referring to is unclear. It would be better if you change it to:

from appscript import *

file_name = '/path/to/your-psd-file.psd'
ps_app = app('/Applications/Adobe Photoshop CC 2018/Adobe Photoshop CC 2018.app')
ps_app.open(mactypes.Alias(file_name))

Agreed. You have to grab the file path somehow by placing it into a file_name variable manually, or by using glob or whatever method to programmatically get the path first or else you will get an error since file_name hasn't been declared and populated.

Also, I would like to add, if you have trouble finding the docs for appscript, which there seem to be none of on the Pypi site, there exists an old wiki on python.org which seems to have more info than sourceforge. They're old, but it looks like the same module.

If anyone knows of something like appscript that is modern and currently supported/developed, please list it. Using abandoned software is not high on my todo list when building production tools.