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?
-
1Yes 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.OnlineCommented Oct 4, 2020 at 4:23
-
1I'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 KritskiyCommented Oct 4, 2020 at 6:46
-
1Thank you both. This looks promising. I'm going to save up for this course and learn more JS in the mean time.– Joseph MassaroCommented Oct 4, 2020 at 9:07
1 Answer
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.