Photoshop CS3 scrolling

Hello All!

I tryed this script:

tell application "Adobe Photoshop CS3" to activate

tell application "System Events"
	tell process "Photoshop"
		click button 6 of scroll bar 2 of window "Untitled-1 @ 600% (Layer 1, RGB/8)"
	end tell
end tell

It’s working well but the window title always changing by the app. I tryed this (and a lots of variation) and it’s not working:

tell application "Adobe Photoshop CS3" to activate

tell application "System Events"
	tell process "Photoshop"
		click button 6 of scroll bar 2 of window 1
	end tell
end tell

How can I get the name of the frontmost document for eg. this:

set a to the name of the frontmost document
.
.
click button 6 of scroll bar 2 of window a

I have no more idea…
And You? Thanks!

tell application “Adobe Photoshop CS3”
set myName to name of current document
end tell

result: “Untitled-1” not “Untitled-1 @ 600% (Layer 1, RGB/8)”

The “600%”, “Layer 1” and the “RGB/8” is not constant…

Hi

the information after the"@" symbol is dynamic it changes constantly depending on what your doing type the command key and + and you’ll see the
600% change.
i don’t think its possible to retrieve that info the way you want.
if your after the name then newellers method is right the bit your after isn’t the actual full name of the window. just the bit before the “@” symbol.

all the other info the other side of the “@” symbol can be got via applescript in various other ways!

tell application "System Events"
	get name of front window of process "Adobe Photoshop CS2"
end tell

Sorry I thought you were only after the name of current document.

pidge1 is correct that the info you are looking for is not the name of the window but gui attributes of photoshop. Document properties or current document properties can get all the info you need except for the % zoomed.

Why may I ask are you looking for the % zoomed? To correctly display and know this information I suggest using InDesign. It is very easy to get the scale of the image, color space, and other useful information.

What are you trying to accomplish with this?

Thanks, it’s working!!! :smiley:

It’s only a part of a “bigger” REALbasic project… :cool:

If you really need this information you will have to jump on the ui side of things with something like this.
http://prefabsoftware.com/uibrowser/

At one time I found apple’s free version of this but had no where near the options prefab has added.