GUI Photoshop

Hi

Does anyone have any idea why this is not working?


tell application "Adobe Photoshop CC" to activate

tell application "System Events"
	
	if UI elements enabled then
		tell application process "Adobe Photoshop CC"
			click menu item "New Guide..." of menu "View" of menu bar 1
		end tell
		
	end if
end tell

I can get Photoshop to just click the “View” menu but subsequent items don’t work. They get clicked but nothing happens.

Model: MacBook Pro 2.7 GHz Core i7 16GB RAM
Browser: Safari 537.31
Operating System: Mac OS X (10.8)

Guides was added to CS5 in JavaScript. Looks like they missed it from AppleScript or I can’t find it.?

app.activeDocument.guides.add( Direction.HORIZONTAL, 20 );
app.activeDocument.guides.add( Direction.VERTICAL, 40 );

You can call JavaScript or use script listener and use action manager code to this either way.

Better than GUI scripting.

Thanks Mark, I’ll try that