Choose selectedFontMaster when calling newTab()

I must be missing something obvious, but when creating new tabs manually, I can assign a different master to each one…
How do I do that in a script? I want to open a new tab with some text and set the selected master for each tab. selectedFontMaster seems to be read-only, how can I set that attribute?

As a workaround I am adding GSLayer objects to the tab but for what I’m doing I guess it would be both faster to compute and easier to be able to pass a simple string to newTab() and setting selectedFontMaster.

Use the tab.masterIndex property.

Well that was easy :wink: thanks Georg!