Trapping dialogs in Pause condition

I have a macro that launches Scrivener and enters in some boilerplate which is expanded using Typinator. As I wrote the macro, it was working until I started to be aware that I had not done my homework. I had set pause for different time intervals when I should have used instances of pause by events. Because of this I lost a couple of pages of data already before I realized what the macro was - or wasn’t, doing.

I need to trap pop-up dialogs when and if they occur. I have Little Snitch installed which alerts me when an app wants to connect for whatever reason. I cannot always plan when this happens. When it happens in the middle of a macro it messes everything up because it takes extra time for me to read the dialog and react to it - while the macro clock continues, come hell or high water.

What do I call such a window? I can see there are a few choices to try but, I don’t even know what I would call such an event?

Hey @levelbest,

Look at this for ideas:

-Chris

Sorry but that looked a little too much for me to grasp. I needed to know if KM can react or trap a system window Because those little suckers will hang up a macro in a hurry.

Thanks

I'm not sure I understand exactly what you want, but maybe the below macro will give you some ideas. It provides a method to detect when a new window has appeared.

It simply pauses until either (the window count has increased) OR (the window title has changed).

####MACRO: [WINDOW] TEST - Pause Until New Window

[WINDOW] TEST - Pause Until New Window.kmmacros (20 KB)

OK, that makes sense. Thanks