Using OLE/COM to launch Photoshop

Discussion of Automation, Image Workflow and Raw Image Workflow

Moderators: Tom, Kukurykus

JasonB

Using OLE/COM to launch Photoshop

Post by JasonB »

Hello All,

I have tried to search for this topic on this board, but have had no luck -- I'm hoping it isn't too far out of the board's expertise.

I am using COM to launch Photoshop from 3dsmax and then send the com object JS commands. This works as intended.

However, what is not predictable is which bit version of Photoshop will open. 32 bit or 64.

3dsmax is 32 bit and on my Windows Vista machine it opens the 64bit version of Photoshop.

I have executed the same code on multiple machines running (what appears to be) the same setup, but it appears to be hit or miss as to the bit version that startsup.

Here is the maxscript that launches Photoshop:
pshop=CreateOLEObject"Photoshop.Application" -- Open Photoshop
pshop.Visible=true


Anyone have any ideas as to what controls/triggers the bit version of photoshop associated with COM?

Thanks in advance,

Jason
Paul MR

Using OLE/COM to launch Photoshop

Post by Paul MR »

Sorry I can't answer your question, but the nearest answer has been here..
http://forums.adobe.com/message/3336412#3336412
But this is not COM, you might have more latitude with VB than C#, with C# it will only target the latest version of Photoshop and it targets the 32bit version, haven't found a way to target the 64bit. It might be because that I am using Microsoft Visual C# 2010 Express instead of the full version?
JasonB

Using OLE/COM to launch Photoshop

Post by JasonB »

Hi Paul,

That link is a good one in that it explains how to launch different versions of Photoshop (such as PS5 or PS6). For the bit version it appears to matter what is actually triggering the launch of the COM command.

Although my tests are all using 32bit 3dsmax, maybe the 'CreateOLEObject' command is based on an external DLL that is 64 bit on my machine, but 32 on someone elses?

Its weird that I can launch 64 bit photoshop while others cannot.

Its confusing to me -- as it appears to boil down to what registry (32/64) is being read -- and controlling that.

J.
Paul MR

Using OLE/COM to launch Photoshop

Post by Paul MR »

Hi Jason, this is worth a read.....
http://social.msdn.microsoft.com/Forums ... bbd9ba6d3a ... bbd9ba6d3a
It does seem to explain a few things.

Edit:-
Also found this and it shows how to set the target for C#, I don't know if it would work for VB?
http://stackoverflow.com/questions/1381 ... ss-edition ... ss-edition
JasonB

Using OLE/COM to launch Photoshop

Post by JasonB »

Your links are leading me down a path of some understanding. And the more I realize this is a COM problem -- not a Photoshop problem.

This link shows how a 32bit app might be accessing the 64bit registry -- which may lead me down the path to providing me more control:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx ... 85%29.aspx

J.