Close All to the Right Macro (v9.0.1)

Close All to the Right Macro (v9.0.1)
I am now to trying to close all tabs to the right of the active tab mainly in Google Chrome. I can right click on a tab in Chrome but I can't seem to replicate that action in Keyboard Maestro. Anyone already have this?

Can't you adapt the macro provided to you here:

MACRO: Close All Tabs to Left of Current Tab

I accomplished it by adding a Chrome Extension. In the Close All to the Left macro, I am not clear as to what makes it go to the left in order to change it, is it the -1 in the execute these actions field? I'm sorry I can sense your annoyance with my questions/posts.

Should I change the -1 or previous to next?

It is this action:

image

Nope. No problem. I was just in a hurry. :smile:

Turns out the macro to close to the right needed some tweaking with pausing to make it work:
image

I don't know why the close to the left worked without it. But this is a good lesson:
Often when things don't work as expected, you need to add a pause between actions, especially after an Action that KM has asked an app to perform (like go to next tab) but KM does not auto-wait for it to complete. So, we need a manual pause.

Here's the complete macro. See if this works for you.
All of the changes/new Actions are in Teal color.
Also had to change the Repeat Action to use this calculation:
Local__NumTab - Local__CurrTab

MACRO:   Close All Tabls to Right of Current Tab

**Requires: KM 8.2.4+   macOS 10.11 (El Capitan)+**
(Macro was written & tested using KM 9.0+ on macOS 10.14.5 (Mojave))

#### DOWNLOAD Macro File:
<a class="attachment" href="/uploads/default/original/3X/b/2/b2f362b5a390af71546649fc4d2e5195a0115e51.kmmacros">Close All Tabls to Right of Current Tab .kmmacros</a>
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**


---


<img src="/uploads/default/original/3X/d/8/d8589622bd6fcbdd28bf4e2d0e8b4a6761245ccb.png" width="508" height="992">