Skip to main content
March 11, 2010
Question

How to script photoshop using C# .net 3.5

  • March 11, 2010
  • 3 replies
  • 18602 views

According to this:

http://www.pcpix.com/Photoshop/

And this:

http://lonerobot.net/?p=374

Script photoshop from .net code is an option.

But, in .net 3.5 I can't find any COM assembly with the name: Interop.Photoshop.dll.

Maybe this assembly support only .net 1.0 ?

This topic has been closed for replies.

3 replies

New Participant
March 16, 2011

Thanks!

Problem was fixed after start PS as administrator at least one time

New Participant
March 16, 2011

I have the same problem. A system can't find the Adobe Object Library in COM  components.

I have two computers. Both have WIN7 64. On both installed same version of CS4

On one VisualStudio 2008 on another Visual  Studio 2010.

On computer with 2008 everything works on computer with 2010 doesn't.

On 2008 system shows that COM was registered from: C:\Program Files\Adobe\Adobe Photoshop CS4 (64 Bit)\Scripting\Utilities\ScriptListener.8li.

Is it's possible make registration from this file manualy?

Or in any ather way?

Paul Riggott
Inspiring
March 16, 2011

Have a read here... http://forums.adobe.com/thread/646495?tstart=300

Steve suggests the following....

Can you try running one of the sample VB scripts from the Scripting directory: c:\Program Files\Adobe\Adobe Photoshop CS5\Scripting\Sample Scripts\VBScript\

See if that corrects the bad path in a registry key.

Paul Riggott
Inspiring
March 11, 2010

The interop file is created for you when you build the project , just select the required Photoshop com object.

There is an example here.. http://forums.adobe.com/thread/584352?tstart=30

March 11, 2010

I think I was not clear. In the add reference dialog, in the COM, I cannot see Adobe Photoshop CS4 Object Libary item.

I have cs4 installer properly.

The question is maybe the problem is that the project is .net2+, and photoshop only supported .net1.0.

I cannot try it, because I don't have VS2003 installed.

Paul Riggott
Inspiring
March 11, 2010

I am using VS2008 Express that uses .net 3.5 I have found that using JavaScript is much better than using C# unless you need to talk to several apps at the same time. It seems that the available Com is the last version of Photoshop that is installed, if you do not see it a re-install may be required, also C# only targets one version of Photoshop, that's a big dissadvantage. The best answer would be use one machine for each version of Photoshop if you need to use C#