How to create an instance of BatchOptions?
zhuquechiye opened this issue · 2 comments
There is an error: pywintypes.com_error: (-2147221164, 'Class not registered', None, None)
when I run this code:
from doc_reference.photoshop_CC_2018 import BatchOptions
batch_options = BatchOptions()
There is another error: pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 'Adobe Photoshop', 'Illegal argument - argument 4\n- Internal error', None, 0, -2147220259), None)
when I tried that:
app = Dispatch("Photoshop.Application")
batch_options = BatchOptions(app)
app.Batch(InputFiles=img_ref, Action=actions[5], From=action, Options=batch_options)
I need choose some options for the Batch command and I found these options in prop_map_get and prop_map_put, but I do not know how to do.
thank you
You can try
from comtypes.client import GetActiveObject, CreateObject
batch_options = CreateObject("Photoshop.BatchOptions")
You can try
from comtypes.client import GetActiveObject, CreateObject batch_options = CreateObject("Photoshop.BatchOptions")
thank you! This solved my problem.