3

I want to write a program that changes the foreground color, selected tool, etc. without having to use things like macros and actions. I'm developing on Windows. Any ideas or resources?

  • 1
    Yes it's possible infact but it has something to do with Photoshop SDK. I don't have solid reference but if you got money than consider spending on this course!. The author of the course is literally highest knowing person about adobe automation since he researched over years. – Mr.Online Oct 4 at 4:23
  • 1
    I'm pretty sure that Photoshop SDK is used to create C++ plugins. You can communicate with PS from other apps with Python via com interface or with JS using sockets (like in the course that @Mr.Online mentioned) – Sergey Kritskiy Oct 4 at 6:46
  • 1
    Thank you both. This looks promising. I'm going to save up for this course and learn more JS in the mean time. – Joseph Massaro Oct 4 at 9:07
5

Photoshop has a VBScript API on windows, more correctly it is a COM API. Which can be programmed in any COM aware language. So C#, C++, Python, any version of Visual Basic, windows own JavaScript engine, PowerShell... Basically almost any language that has full on windows bindings. This mostly leaves out Java runtime based languages (although a COM bridge is available if you have a lot of extra cash lying around.)

Since the COM API can set the foreground color with Application.ForegrounColor, no problems whatsoever. Need to call form your app? Use COM. Need to attach to exel? Use use COM.

This is way more simpler than working with sockets, but has the downside of ONLY working on Windows. The c++ API is meant to let Photoshop eat your application not the other way around while the COM bridge is just a fancy way of handling inter process communication in a way that generates the needed API automatically on the fly.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.