Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Photoshop scripting - using enumerates.

New Here ,
Oct 12, 2024 Oct 12, 2024

I'm starting to learn Photoshop python scripting and can't figure out the following:

 

when I need to use some of the Photoshop Classes, I use for example:

 

solidColor = win32com.client.Dispatch("Photoshop.SolidColor")   # import SolidColor class

 

but how can I import photoshop Enumerations, such as FontSize, BlendMode etc.?

 

I always end up with error: ".... not defiend" when trying to use Enumerations like: BlendMode.OVERLAY.

 

Could somebody please show any example of Photoshop Enumerations importing?

 

 

 

 

TOPICS
Actions and scripting
182
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Community Expert ,
Jan 22, 2025 Jan 22, 2025
LATEST

When working with Photoshop scripting in Python using win32com.client, enumerations like BlendMode or FontSizeare not directly available in the same way as classes like SolidColor. These enumerations are part of Photoshop's scripting environment and are accessed differently.

In Python, you typically need to reference the enumeration values explicitly as their integer constants or use the win32com.client.constants object to access them dynamically.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines