We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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) cd = adobe_app.ActiveDocument except: cd = adobe_app.ActiveDocument # cd = adobe_app.ActiveDocument currentTextLayer = cd.Layers[0] print(currentTextLayer)
`
Any suggestions?
The text was updated successfully, but these errors were encountered:
Just got the same error. I solved it by replacing Layers['name'] by Layers.Item('name')
Sorry, something went wrong.
No branches or pull requests
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)
cd = adobe_app.ActiveDocument
except:
cd = adobe_app.ActiveDocument
# cd = adobe_app.ActiveDocument
currentTextLayer = cd.Layers[0]
print(currentTextLayer)
`
Any suggestions?
The text was updated successfully, but these errors were encountered: