Skip to main content
K.Daube
Community Expert
October 18, 2022
Answered

ScriptUI - how to go to the first control from anywhere

  • October 18, 2022
  • 2 replies
  • 436 views

There is a TAB order - by default the order of creation of controls. I run into some questions here:

  • I do not find a property to explicitly define the tab order. → How to?
  • When amidst an assembly of controls and i want to got to the first one (tab index = 0), it seems that I have the option to back-TAB as often as nescessary - HOME does not work at all. → Any other ideas?

Thank You for any insight.

This topic has been closed for replies.
Correct answer K.Daube

Peter Kahrel from the InDesign forum gave this answer:

  • You can't change the tab order in ScriptUI. It is the order of the controls in the code.
  • Most controls have the property .active. You can use that as the window's entry point, so to speak.
  • The tab key is the only one available to navigate a window.

2 replies

Fightergator
Inspiring
November 23, 2022

I've seen ScriptUI in some of the code examples on this forum, but am not very familiar with what it does and why someone writing a script would want to use it.  Is there a good tutorial on ScriptUI that I can use to get smarter, or a couple of simple examples of how they work. 

frameexpert
Community Expert
November 23, 2022

This is the absolute, essential guide. I recommend printing it out and trying the examples.

https://creativepro.com/files/kahrel/indesign/scriptui.html

ScriptUI is for making nice interfaces for your scripts. Here is a dialog box from my TableCleaner script, written with ScriptUI code:

Fightergator
Inspiring
November 23, 2022

Thanks Rick.  I'll check it out.  This would be the next logical step in my ExtendScript education.  I was doing some basic control panels in VBA, and can see where they would be useful in one of the scripts I'm working on now.  Have a Happy Thanksgiving.

K.Daube
K.DaubeAuthorCorrect answer
Community Expert
October 26, 2022

Peter Kahrel from the InDesign forum gave this answer:

  • You can't change the tab order in ScriptUI. It is the order of the controls in the code.
  • Most controls have the property .active. You can use that as the window's entry point, so to speak.
  • The tab key is the only one available to navigate a window.