How can I do a mouse scroll on a Finder window in AppleScript ?

I know there is keystroke for the keyboard, click for a mouse click, but is there something for the mouse wheel ?

1 Answer 1


You can set scroll bar position using Apple Script. In Finder without horizontal scroll bar You can do something like:

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

Tip from https://discussions.apple.com/thread/1540280?start=0&tstart=0 User James Nierodzik

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .