Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Scrolling in a Window Automatically with AppleScript

My second post in two days... I promise that I search for at least an hour on questions like this!! I can't find anything...

Can I control the scroll arrows of a window (specifically a Finder window)? If I have a window with scroll bars showing, can I move them to the top, or say all the way to the left, or perhaps right in the middle at 50%? 70%?

I have looked at commands for "scroll areas" (which I am kinda cloudy on) and "sliders" and I cannot seem to make anything work. I'd even take something that mimics the effect of the "home" and "end" buttons on the keyboard (although I'd still like control over left and right scrolling).

I've Googled. I've searched both the Finder and System Events dictionaries. I've looked through the "Missing Manual". I'm just at a loss... Haylp!

Message was edited by: Achy Fakey

Power Mac G5, Mac OS X (10.4.11)

Posted on May 30, 2008 11:23 AM

Reply
Question marked as Best reply

Posted on May 30, 2008 3:55 PM

Unfortunately I can't test on Tiger at the moment, but this works on Leopard so hopefully it will be of some use to you.

activate application "Finder"
tell application "System Events"
tell process "Finder"
-- range is from 0.0 to 1.0, so to scroll halfway you would use 0.5
set value of scroll bar 1 of scroll area 2 of splitter group 1 of front window to 0.0
end tell
end tell
2 replies
Question marked as Best reply

May 30, 2008 3:55 PM in response to Achy Fakey

Unfortunately I can't test on Tiger at the moment, but this works on Leopard so hopefully it will be of some use to you.

activate application "Finder"
tell application "System Events"
tell process "Finder"
-- range is from 0.0 to 1.0, so to scroll halfway you would use 0.5
set value of scroll bar 1 of scroll area 2 of splitter group 1 of front window to 0.0
end tell
end tell

Scrolling in a Window Automatically with AppleScript

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.