I should note that when I CreateObject("Photoshop.Application") with x32 photoshop open I get the error
Code : 800A01AD
"ActiveX component can't create object"
although it does bring to front photoshop, and this error is dealyed by about 10 seconds.
if I have no photoshop open, I get the x64 version started, and I get no problems with the 64 bit version
perhaps there is a need for Photoshop.Application.12.x32 or simialr ?
Will anyone from Adobe answer this? I thought techs are suppose to be monitoring the forums, and this problem is very valid... Now for me as well.
I have this exact same problem in reverse. I have a script that runs Photoshop CS5 x32 perfectly, but when I have PS x64 open and run the script, the code hangs for 10 seconds and then displays the same 800A01AD error on the CreateObject("Photoshop.Application") statement.
I would like my scripts to be able to run under x64, to take advantage of the larger memory space. I'm using 32 bit Visual Basic, and I'm not confident that this would work better if I was running the scripts from a 64 bit host application.
Today I talked to "John" at Adobe tech support. He obviously had no grasp of what a script even was. After being on hold for 25 minutes, he told me he had no solution, but that he posted the question on the forums for a real tech to answer. I cannot find that post, so I figured I'd add my voice to this most applicable one.
Script Listener generated code does not work when you are using Win 7 64 bit and Visual Studio 2008/2010. It will not work with either the 32 bit or the 64 bit version of Photoshop on Win 7 64 bit.
It does work (for me at least) when you are using Win 7 32 bit and the 32 bit version of Photoshop CS5.
This is a significant difference from CS4 and earlier versions of Photoshop.
I have been writing Visual Studio / Photoshop scripting programs since Photoshop CS and earlier.
You seem to talking about the code generated from Script Listener, but neither rmawatson and I mentioned that product. I believe we were both talking about more general Photoshop scripting from within our own applications.
Since the original poster is able to run 64 bit scripting, I'm guess what you've written above does not apply to the broader concept of 32 vs 64 bit scripting.
Yes, as I mentioned in my first reply I was talking about script listener generated code.
As to the issue of creating scripts that run on either 32 bit or 64 bit Photoshop. The only way I have found around this problem is to have two systems, one running Win 7 32 bit and the other running Win 7 64 bit. I have to compile my programs (again I use Visual Studio 2008) on each system and then distribute each as a different version of the program.
Wow for sure! Here is some experiments I do to see what is going on. This is on a 64 bit windows 7 machine. I run as admistrator and with that annoying "are you sure you want to run the thing you just tried to run" OFF. User Access Control (UAC) I think is the official name.
I open up a command prompt, cmd.exe, in 64 bit mode. Window-R "cmd" (I haven't tried this with a 32 bit cmd prompt (H:\Windows\SysWOW64\cmd.exe).
Go to where the Sample Scripts are, doesn't matter wich version as the vbs files are the same. Mine is here:
H:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Scripting\Sample Scripts\VBScript
Make sure no photoshop is running and type in:
Wait for the script to complete but do not hit the "ok" yet on the script.
Launch windows task manager and note that both Photoshop (you can tell when the splash screen launches as well) and csript are in 64 bit mode.
Now hit ok and quit Photoshop, wait for them both to be gone from task manager and type in:
Now you see that both Photoshop and cscript are in 32 bit mode.
Now trying to "cross the wires" does not work.
Launch 64 bit photoshop first, then try to run the 32 bit script. You see that 32 bit won't launch, we block both 32 and 64 bit running at the same time, and the cscript will time out. Doing the 32 bit Ps and 64 bit cscript will cause the same problem.
Hope that helps you and you could be a way that you control which version of Photoshop gets launched for your case. I thought I read somewhere that you could talk from a 32 bit to a 64 bit via VBScript (OLE Automation) (Automation) but never could find or build a real example.