Can this be done better using ONLY Keyboard Maestro?

Hello.
I am very happily using KM for 10 years now but unfortunately I feel I’m still scratching the surface.
I created a macro and I’d love to learn from higher knowledge guys if this can be done more efficiently/elegant/less tedious/sense making ways.
The macro copies a column of websites from a list in Excel and opens each of them in a new tab in Safari.
TIA.
Saul

Copy site's name in XL. Search in YT Macro (v11.0.2)

Copy site's name in XL. Search in YT.kmmacros (56 KB)

Here's one way it can be done, using AppleScript.

Download Macro(s): Open URLs in Safari.kmmacros (3.7 KB)

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 11.7.9
  • Keyboard Maestro v11.0.2
1 Like

Hi roosterboy and thanks a lot for your reply, I very much appreciate it!
I need to apologize, if feel bad that you wanted to help me and I wasted your time, IT'S MY BAD but I forgot to include one sentence and it is that the solution/improvement I'm looking for, I would like to use only KM, because those are the only "tools" that I know and can modify and tweak it for my needs later
With Apple Script I have no idea how to do it.
Maybe I need to delete this post, rephrase and repost it?
Now, regarding the macro you built, I tried it and it gives me an error message.

And again, thank you very much for your help!

1 Like

Bearing in mind you want to use only KM actions and not other scripting tools, here's a macro that will do what you wish.

There is just one proviso: before executing the macro make sure you click your mouse in the column header containing your URLs in order to select that column. In the sample you give above, you'd click the "A" in column A in order to select it prior to running this macro.

Download Macro(s): Test Excel and Browser Tabs.kmmacros (4.4 KB)

Macro-Image

Keyboard Maestro Export

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 13.6.1
  • Keyboard Maestro v11.0.2

(Note: Make sure you enable the macro and put it into one of your macro groups.)

2 Likes

Hi, @Saul.

@tiffle, has already shared a solution, but here's another take that you might want to consider.


Download: Open URLs Included in an Excel Spreadsheet.kmmacros (16 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 14.2.1 (23C71)
  • Keyboard Maestro v11.0.2

On a related note, you might find this subroutine useful: MACRO: Activate, Reload, or Open Browser Tab

1 Like

Thanks tiffle and Jim! VERY MUCH appreciate your help! I'm so glad you answered!

Can't check right now, will in the afternoon and then I'll come back for feedback/complaints... :rofl:

Jim, you used the word "Assumptions"...

ALWAYS ASK, NEVER ASSUME !!

His request approved, the CNN News photographer quickly used a cell phone to call the local airport to charter a flight.

He was told a twin-engine plane would be waiting for him at the airport.

Arriving at the airfield, he spotted a plane warming up outside a hangar.

He jumped in with his bag, slammed the door shut, and shouted, 'Let's go'.

The pilot taxied out, swung the plane into the wind and took off.

Once in the air, the photographer instructed the pilot, 'Fly over the valley and make low passes so I can take pictures of the fires on the hillsides.'

'Why?' asked the pilot.

'Because I'm a photographer for CNN' , he responded, 'and I need to get some close up shots.'

The pilot was strangely silent for a moment, finally he stammered, "So, what you're telling me, is . . . You're NOT MY FLIGHT INSTRUCTOR??!!"

Funny quip, @Saul. But did I assume correctly? If not, I suspect that you'd be able to make the necessary adjustments. If not, feel free to follow-up.

1 Like

OK, I followed your macros and succeeded to learn the "For each item in a Collection" (which for me is HUGE!!!) and build a macro "sawn to my needs" (I changed the URL list with song names list).
And... again... open for improvements...

Wanted to THANK YOU deeply guys. This forum is full of Golden People!!!

(BTW, sorry it took me such a long time to get back here but, as one of my friends put it once... "That's what happens when life gets in the middle".)

Search YouTube for a list of songs in Excel Macro (v11.0.2)

Search YouTube for a list of songs in Excel.kmmacros (20 KB)

1 Like