Scroll down picture by picture

I'm going through hundreds of photos of homes.

I want to be able to hit a hot key and scroll to the next pair and have it vertically centered.

I set up a KM macro to
page down once
arrow up 5 times,
then simulate mouse scroll 4 times up

It's semi-okay, but keeps drifting up or down since it's not exact. And I'm starting to think the box around photo and blurb is not always exactly the same size anyway.

There are 2 records side by side. About 1.5 records fit the screen vertically. Underneath each photo is a blurb about the house and an arrow and heart icon.

Can I set up KM to scroll down to the next 'arrow' icon? I would need to tell KM to search only within a certain area, since there are alway 2 or 3 rows visible and there are always arrows on the screen.

here's an example

I could search for the next heart or arrow for example

I'm basically looking to make it work like Twitter (X) does when you hit 'J'. I advances to the next post and it's lined up right to read it.

I found the "in area" thing at the bottom of the 'While'. Maybe that will do it.

On my screen the height of each "cell" is 370 pixels:


So all I need to do is to scroll by 370 pixels each time.

Try this macro, but first make sure you change the value in the red-coloured action to suit the pixel height on your screen and , of course, use a hot key to suit you:

Download Macro(s): Test Scroll Window.kmmacros (1.9 KB)


Keyboard Maestro Export

  • Macros are always disabled when imported into the Keyboard Maestro Editor.
    • The user must ensure the macro is enabled.
    • The user must also ensure the macro's parent macro-group is enabled.
System Information
  • macOS 10.15.7
  • Keyboard Maestro v10.2

The trouble I'm having is with the "Simulate scroll wheel". It behaves irregularly, at least on my system. I tried your version and the first few jumps looked perfect. However even your version randomly doesn't move correctly and I end up much too high. I tried waiting a few seconds between hot key presses, but still get the random misbehaving. In fact, that's why I went to 'screen down' and a few arrow keys to get me almost there, then the misbehaving scroll wheel. I even noticed it if I jumped one pixel at a time in a loop.

Loop 5 times
_ scroll wheel 1 pixel
_ pause .1 seconds

I even noticed that if I changed the 'pause' after the Simulate scroll wheel, it would leave me at different places.

I suppose it could be from the mouse I have installed or my point-stick keyboard.....?

So anyway, I gave up on Simulate scroll wheel for an accurate and reliable movement.

Thank you very much for the reply and suggestion.

Too bad. I didn’t do a whole lot of testing so it might well do the same on my system…

There’s another thread here about a similar issue so it might be worth monitoring that as well just in case they come up with something there.

I might misunderstand your need but when checking your provided example link it seems to me that tapping down arrow twice (in Firefox) does something like what you want?

The pattern/behaviour breaks a little after reaching the "How much is my house worth?"-commercial, but still gives the result of moving down one row of images


What browser are you using and what macOS?

I've done some more testing of the macro I posted and it works without a problem.

I'm using Safari and macOS 10.15.7 so maybe that's the problem?

Something like this also seems to do something like what you want:

ScrollDOWN To Next Row Of Images Macro (v10.2)

ScrollDOWN To Next Row Of Images.kmmacros (18 KB)

Based on your screen resolution you might have to adjust the area in the until the screen contains image.

I also added a counter/fail safe in case it misses to pick up on the image, it will never scroll down further than 400 rows of pixels.

Hi Alexander, the link I gave was just a sample to illustrate, I have maybe 15 or 20 of these lists and they are behind paywalls and they are different page code, different sizes, slightly different layouts. But automating some universal method for going down one row of image at a time, like the double down arrow on the zillow sample you discovered would be be great. I will play with your code hopefully over the weekend. I fiddled and fiddled with "find image" but it never found any image. Your code will probably help me figure out what I'm doing wrong. Thank you sir.

I'm using MacOS 12.6.6 and Vivaldi browser. I didn't test the scroll wheel variability in other browsers. Also Vivaldi just had a big update last night. I should probably test again, and probably try some other browsers thanks. Thanks!

Long shot but does tabbing work?