CS2, C# and controlling layers!

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

moongirl

CS2, C# and controlling layers!

Post by moongirl »

Hi all,

I am just starting with scripting photoshop and downloaded a tryout version of CS2. At the beginning of a small bit of vbscript i have the line:

Set appRef = CreateObject( "Photoshop.Application" )

Which causes this error:

ActiveX component can't create object: Photoshop.Application

I checked out the Adobe scripting reference and it says for Photoshop CS2 the reference should be changed to:

Set appRef = CreateObject( "Photoshop.Application.9.1" )

but I get the same error. Any ideas? I'm not sure if it's relevant or not but I also have a full version of Photoshop 7 on my PC.

Thanks in advance!
MickM

CS2, C# and controlling layers!

Post by MickM »

That is odd. It should work and it doesn't need the 9.1 either. On my machine with CS and CS2 installed the following script opens CS2.

Dim app
set app = CreateObject("Photoshop.Application")

I really don't know what is wrong as I thought the trial version should work. Have you got Office installed? If so try it in VBA. Also do you get the message with the app open and/or before opening?
moongirl

CS2, C# and controlling layers!

Post by moongirl »

Thanks, I checked my code and there was a space between each bracket and quote - i removed the spaces and it worked! Silly me.