Way to Detect New Chrome Window?

Is there a way to set up a macro to detect if a new Chrome window has been opened? The below macro runs every 5 seconds, setting a variable to the ChromeURL, looking for a particular new window that I open frequently.

I use a bookmarklet to send pages to Diigo.com. The bookmarklet is supposed to close its resulting new window automatically, but the Javascript doesn't work. So, I have KM look for the share windows and close them for me and the main window tab that I saved to Diigo. (It's a pain in the ass and it slows me down, but it's the best I've got.)

In addition to the annoyance and slowness of this method, KM uses a lot of CPU cycles by checking Chrome and setting that variable every 5 seconds. I'm hoping the community can help me figure out a more efficient way of doing this.

Here's one approach. Create a macro in a group limited to Chrome, and trigger it using a trigger of "The focused window changes":

Then, get and check the URL of that window to see if it is the one of interest.
IF not, Cancel the Macro.

You may have to add some logic to prevent re-processing of the target URL if you simply switch to a different window, and then back.

Giving that a try. Thanks.

It’s still pretty memory intensive. Now all of the sudden KM is executing the close window twice. It’s not the fault of changing the trigger because it happens with the original trigger version, too. Weird.