Click each identical download icon on a web page

I would think using For Each I could click on each image but I can't program the location to click at.

I'd like to download each song at Odd Sundays Download Page

I also don't see how to paste my current script in here. Sorry.

Welcome to the KM forum!

It would be worth a few minutes of your time to review these:

Here's the script:
download all Macro (v10.2)

download all.kmmacros (31 KB)

Since nobody else gave it a shot how about this:

Download Macro(s): Test Click on All Found Images.kmmacros (24 KB)

Macro-Image

Macro-Notes
  • 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.14.6
  • Keyboard Maestro v10.2

The macro just

  1. Loops around each image found (in this case a folder icon on my desktop)
  2. Converts the found image properties to a mouse coordinate
  3. Sets the mouse position
  4. Clicks at the mouse position plus 10 pixels (to make sure the click happens inside the found image)
  5. Pauses so you can see what's happening.

Obviously you'll need to use your own image in step 1. You may not need the pause in step 5.

By the way - I always use local variables where I can as I don't want to accidentally interfere with other variables in other macros.

Hope that helps you along the way!!

Thanks! This worked after I moved the image resolution slider a little to the right. The only thing that didn't work that I might have wanted is that it searched the screen, not the page. So I had to run the macro, scroll the page, repeat.

If you can’t see something then neither can KM, so if something’s off-screen you need to bring it on screen before KM can do anything with it. Ask yourself how do you click on a download link if it isn’t actually visible?

I’ve done this kind of thing quite successfully with web pages that are too long to fit on the screen. The logic is something like this:

  1. Load the URL in the browser.
  2. Process the visible links.
  3. If at bottom of page then exit macro.
  4. Scroll the page.
  5. Repeat from step 2.

Anyway - glad to hear you got it working.