Skip to main content
K.Daube
Community Expert
Community Expert
Oct 18, 2022 1:51 PM UTC
Answered

ScriptUI - how to go to the first control from anywhere

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 is closed to new replies. Start a new post to keep the conversation going.
K.Daube
K.DaubeCorrect answer
Community Expert
Oct 26, 2022 4:17 PM UTC

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.

4 replies

Fightergator
Inspiring
Nov 23, 2022 2:23 AM UTC

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. 

Translate
frameexpert
Community Expert
Community Expert
Nov 23, 2022 1:03 PM UTC

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:

Translate
www.frameexpert.com
Fightergator
Inspiring
Nov 23, 2022 7:24 PM UTC

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.

Translate
K.Daube
Community Expert
K.DaubeCommunity ExpertAuthorCorrect answer
Community Expert
Oct 26, 2022 4:17 PM UTC

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.
Translate