Are Window indexes 0 based? Or do they start with 1?

Basically the subject. I did a few forum searches and didn't find the answer.

0, as described in the KM wiki here: function:WINDOW [Keyboard Maestro Wiki]

I'd think they're 1-indexed -- 0 is a special reference to the currently focused window, which is usually window 1 (does anyone have an example of when it isn't?).

@majorgear -- try for yourself. Have two KM Editor windows open, create a new macro, add the following and run the macro:



Quite right - my mistake:)

1 Like