Open Application in 32-bit mode

I need to open photoshop in 32-bit mode for a couple filters to work. This works but has a couple problems. First is that when photoshop is opened it is not the front most window, terminal is the front most. Also terminal stays open and if quit then photoshop quits.

tell application "Terminal"
	activate
	do script "arch -i386 \"/Applications/Adobe Photoshop CS5/Adobe Photoshop CS5.app/Contents/MacOS/Adobe Photoshop CS5\""
end tell

“do script” runs a command in the Terminal window. You want “do shell script” which runs it as its own process. Note: do not put “do shell script” in a “tell application Terminal” block of code.

do shell script "arch -i386 \"/Applications/Adobe Photoshop CS5/Adobe Photoshop CS5.app/Contents/MacOS/Adobe Photoshop CS5\""

Here is the solution that worked.

tell application "Terminal"
	activate
	do shell script "arch -i386 \"/Applications/Adobe Photoshop CS5/Adobe Photoshop CS5.app/Contents/MacOS/Adobe Photoshop CS5\" &> /dev/null &"
	quit
end tell
tell application "System Events"
	using terms from application "System Events"
		tell application "Adobe Photoshop CS5"
			activate
		end tell
	end using terms from
end tell

Like regulus said, you should not put your “do shell script” in a “tell application Terminal” block…



   do shell script "arch -i386 \"/Applications/Adobe Photoshop CS5/Adobe Photoshop CS5.app/Contents/MacOS/Adobe Photoshop CS5\" &> /dev/null &"

       tell application "Adobe Photoshop CS5"
           activate
       end tell

I’m also not sure why you’re using the “System Events”, and you’re not telling Photoshop to do anything but activate, is that even doing anything for you?

I found if I don’t so it the way I posted it opens to version of Photoshop, one in 32–bit and the other in 64-bit. With my solution it only opens the 32-bit. May not be technically right, but it does what I need.