lohriialo / photoshop-scripting-python

Scripting in Photoshop is used to automate a wide variety of repetitive task or as complex as an entire new feature
486 stars 94 forks source link

layer.typename is not found? #2

Closed siriusi closed 5 years ago

siriusi commented 5 years ago

There is an error: NameError: Name typename not found when I run this code:

from comtypes.client import GetActiveObject
app = GetActiveObject("Photoshop.Application")
srcDoc = app.Open("E:\\Project\\Page_To_Bar\\images\\MangaTest.psd")
print("type", app.activeDocument.activeLayer.typename)

I sure layer.typename is aviliable in ADOBE PHOTOSHOP CC 2015 JAVASCRIPT SCRIPTING REFERENCE Can you help me? Thank you.

lohriialo commented 5 years ago

typename does exist, instead of comtypes.client, try win32com.client then you should be able to get the typename