Trigger Fails When Finder Window Opens

I'm having problems getting a macro to run when Finder windows open. The macro runs if I use the hot key, but it does not run when I just open a Finder window - I would like it to run anytime a Finder window opens. What am I doing wrong? (see below; the AppleScript just sets column parameters of the Finder window).

43%20AM

-- And similarly, I need this action to NOT run when windows have certain names (see below). I have tried different permutations of the "If Any Condition" action, but none seem to work. This does not work either with Hot Key or when the Finder Activates. Any ideas?

45%20AM

When you have a question about one of your macros, please post both the macro image and file.
See post/upload your script/macro.

Are you sure your Macro is not running? Could it run, but just fail to do anything?
In these cases, it is best to first execute a Notification action to confirm the Macro runs, or not, like this:

This macro works fine for me. It is triggered when Finder is activated.

MACRO:   Test Trigger by Finder Window [Example]


#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/1/d/1d64a7a08317336400f64dab503701290d56d71c.kmmacros">Test Trigger by Finder Window [Example].kmmacros</a> (2.2 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**

---



![image|487x531](upload://kLrrfd2rwglSFMfXjKBENlteFtJ.png)

---

However, if the Finder does not have any windows, or the Frontmost window is not truly frontmost, then your script will fail most likely.

See this post for a similar issue:
**[How to Close Finder Tab? ](https://forum.keyboardmaestro.com/t/how-to-close-finder-tab/1894)**

OK, so I have one part of this issue fixed: I changed the Trigger to "The focussed window: The focussed window changes" This seems to make it work. (see below)

16%20PM

Resize Finder Window - Column 500, Width 1172 ORIGINAL.kmmacros (4.1 KB)

-- But I still need to figure out a way to exclude certain windows from this macro, as per the second item of my original post. Does anyone know how to do this? Here is the macro I have been working with (and I have changed conditions many times, but can't seem to get it to work....):

Resize Finder Window - Column 500, Width 1172 IN PROGRESS.kmmacros (5.6 KB)