Detect number of tabs In an app? For tab-switching

I also tried with UI scripting but the “tabs” somehow are non-existent.

Yes. But beware, it’s a “creative” experimental approach :upside_down_face:

The idea is to use the built-in standard shortcuts for cycling through the tabs (⇧⌘] and ⇧⌘[):

Select Tab by Number <44B3 200225T190504>.kmmacros (9.1 KB)

Basically it goes like this:

You press one of the hotkeys (⌘1, ⌘2, etc.) and the corresponding tab will be selected.

When you run the macro the first time:

  1. Select tab 1 in Glyphs Mini (important)
  2. Run the macro, for example ⌘3 to go to tab 3

As long as you want to use the macro you must not select a tab manually. Never. If you look at the macro, you’ll understand why: the calculation of the difference of current tab and desired tab will be messed up.

If you have messed up, you can recalibrate the macro at any time by doing this:

  1. Select tab 1
  2. Press ⌘0
2 Likes