Open MFRS opened 1 year ago
I cannot select a layer, this is my code
` import win32com.client as win32 import os from comtypes.client import GetActiveObject, CreateObject
try: adobe_app = win32.GetActiveObject("Photoshop.Application") except: adobe_app = win32.gencache.EnsureDispatch('Photoshop.Application') try:
cd = adobe_app.ActiveDocument except: cd = adobe_app.ActiveDocument # cd = adobe_app.ActiveDocument currentTextLayer = cd.Layers[0] print(currentTextLayer)
`
Any suggestions?
Just got the same error. I solved it by replacing Layers['name'] by Layers.Item('name')
I cannot select a layer, this is my code
` import win32com.client as win32 import os from comtypes.client import GetActiveObject, CreateObject
try: adobe_app = win32.GetActiveObject("Photoshop.Application") except: adobe_app = win32.gencache.EnsureDispatch('Photoshop.Application') try:
cd = adobe_app.Open(filepath)
`
Any suggestions?