Open a doc with a few layers, select one, and run this :ĭef _createLayerMask(): # create layer mask on active layer Sometimes we will need to use sort of javascript code transformed to python COM. But not all is possible with COM functions. Here we have used some COM code to do stuff. Ok, now you get the basis, and before you start writing heavy stuff … Get Photoshop CS6 VBScript Reference.pdf, there is all vbscript functions into. Print "FillOpacity:", myLayer.FillOpacityĪ few more stuff (some code delete and alter layers, so all is commented) : Print "Bounds:", myLayer.Bounds # detect empty layers !!! Print " Doc Resolution: %sdpi" %doc.Resolution Print " Doc BitsPerChannel:", doc.BitsPerChannel Print " Doc size:", int(doc.width), int(doc.height) name.encode('cp1252') for i in range(0, openDocs.Count)] Print "Number of open docs:", openDocs.Count "psHue", "psSaturationBlend", "psColorBlend", "psLuminosity", "psHardMix", "psLighterColor", "psDarkerColor", "psSoftLight", "psHardLight", "psVividLight", "psLinearLight", "psPinLight", "psDifference", "psExclusion", "psColorBurn", "psLinearBurn", "psLighten", "psScreen", "psColorDodge", "psLinearDodge", "psOverlay", PsBlendMode = ["none", "psPassThrough", "psNormalBlend", "psDissolve", "psDarken", "psMultiply", Open some files into Photoshop, then try this: PsApp = Dispatch("Photoshop.Application") If Photoshop isn’t started, it will start it.
#Photoshop 64 bit 32 bit 8li start up error how to#
Let’s share thinking, new function etc, seems there is lot that can be done.įirst, like ever posted, here is how to ‘connect’ to Photoshop: I’ve found different stuff looking into it for a few tools here, and though about sharing it so other people can get it and enhance all that. I’m using python 2.7 圆4, Photoshop CS6 (圆4), on win7 pro 圆4. Hi folks, here is a few findings about python script controlling Photoshop.