I have been tasked with porting our javascripts to python. I have traversed the first bit which was triggering a python script via JSX thx to some help from Adam Pletcher’s old blogpost, and some tips from Matt Greene.
Now I am faced with the problem of porting some legacy script-listener portions of our javascripts to python, and I can’t get them to execute. I found this blogpost by Pete Hanshaw explaining exactly what i want to do, but the examples do not work for me. I have not found a way to get any useful warnings or errors via COM, so i am pretty much up a creek. Does anyone have any advice?
Once I got debugging info outta wing i found my problem, my copmtypes reference for create object was wrong (twice Ack!). Originally I had:
desc1 = CreateObject( “Photoshop.ActionDescriptor” )
then I mistakenly tried:
desc1 = objApp.CreateObject( “Photoshop.ActionDescriptor” )
but finally I noticed that the proper reference for CreateObject to comtypes should be:
desc1 = comtypes.client.CreateObject( “Photoshop.ActionDescriptor” )