# get pyps module in photoshopConnection for connect function to PS from https://github.com/theiviaxx/photoshopConnection # get pbkdf2 module support encrypted TCP connection for above from https://pypi.python.org/pypi/pbkdf2 import sys path = 'pathToThatModule/photoshopConnection' path in sys.path or sys.path.append(path) path = 'pathToThatModule/pbkdf2-1.3' path in sys.path or sys.path.append(path) from pyps import Connection, EventListener, ConnectionError c = Connection() #c.connect('ps_password', '192.168.1.8') # optional remote photoshop server on other computer c.connect('123456') # when you set password in photoshop as 123456 c.send_sync('app.foregroundColor.rgb.red=255;') # need ; for each end command c.send_sync('app.foregroundColor.rgb.green=0;') c.send_sync('app.foregroundColor.rgb.blue=128;') res = c.send_sync('app.activeDocument.artLayers.add();') # <[ArtLayer Layer 2]:> res = c.send_sync("activeDocument.activeLayer.name='Remote layer';") # c.close() # it also have listerner feature, which keep listening how what Photoshop do