Regardless of which window is specified in an AppleScript, the "make new tab" code causes a tab to open in the rearmost window. The script…
tell application "Orion"
tell window index 1
make new tab with properties {URL:"https://twitter.com"}
end tell
end tell
… opens the rear-most window instead of the frontmost window, and changing the index number has no effect. The same is true if the word "index" is left out:
tell application "Orion"
tell window 1
make new tab with properties {URL:"https://twitter.com"}
end tell
end tell
(As before, changing the number has no effect.) Even if I have a window saved as a Named Window with the name Music, and I specify that window name in the script, it will be ignored and the tab will be opened in the rearmost window:
tell application "Orion"
tell window "Music"
make new tab with properties {URL:"https://twitter.com"}
end tell
end tell
I am using Orion 0.99.116 on MacOS 12.4.