This content has been marked as final. Show 10 replies
1. Yes, with ScriptUI.
2. Yes, with ScriptUI
3. Nope, but you can create them yourself.
4. Yes, it can, but you'll have to code it yourself. Not trivial.
I have a ton of ScriptUI experience, so just ask away on how to get this stuff done.
ScriptUI does not exist in ID CS2, by the way.
Thanks for the answers Bob. They are exactly as I thought, but wanted to make sure. It sucks that we have to recreate (via code), things that were given to us before Script UI. I know Script UI is more powerful in some ways (and hopefully sure will get more powerful with time) but loosing measurement boxes is a big bummer. They had so many nice built in features. I feel like I need to reinvent the wheel with Script UI.
1. Do you have any example dialogs that you could post? I can often figure out how to get a lot of stuff done by looking over examples other people have created. Especially things where one feature interacts with another, but even just a dialog with menus, text, etc so I can check out how to layout the dialog. I have created one dialog with Script UI, but am not sure if I am doing it very efficiently and I couldn't find any Script UI stuff in InDesign's sample scripts.
2. I suspect if I use Script UI I'll have to verify that only numbers are entered into the edit fields right? I need numerical values only for what I will be doing. Any thoughts on the best way to verify it's only a number in there? Can I do that live in the dialog before the user clicks OK? Argh, all these complications make me less than enthusiastic to go to Script UI, but I really would like to be able to have a live updating dialog.
OK, I've put together a demo file that shows the following:
1. Creating a very simple dialog
2. Validation for decimal number input into a text field (the text field turns red if the text field does not contain a decimal number, and the OK button disables)
3. Storing the settings contained in the dialog in a preferences file and using the last "OK'd" values as default
4. Allowing the user to store an arbitrary set of dialog settings (giving them a name), select stored settings from list, and populating the dialog from the selected settings.
It's 318 lines long, way too big to post here. 226 of those lines are functions available in my script library. That library code makes all of the described ScriptUI functionality possible in 90 or so lines.
If anyone would like a copy, please email me offline at email@example.com. I'll include the latest version of the script library (which is not yet available on my site www.creativescripting.net).
Genius! Thanks soo much Bob.
> 4. Yes, it can, but you'll have to code it yourself. Not trivial.
Really? I spent considerable time trying to do that, and decided it
wasn't possible. (I assume he means the small nudge of the regular
widgets. As far as I know, there's no arrow key events. How would you
Your right, Harbs.
In fact, I remember looking at that with you back when. I just fergot.
Must have been all those drugs when I was younger.
While I like the interactions I can create with Script UI, for now I can't really use it since it doesn't work with CS2. That, and not having Measurement Editboxes are two things that kill it's usefullness for me currently. Here's to hoping CS4 will add more editbox types (and nudge keystrokes) to Script UI! There's no reason why the old type of dialog should have features that Script UI can't do. So I figure it's just a matter of time until Script UI gets updated so it has all the old stuff, plus all it's extras. Then I'll be a happy man.
in a scriptUI dialog i've created a couple of editText objects, and entered a default value in all of them. When I tab into the first box however, the value doesn't get selected, as it does in the second, third etc. And the weird thing is: it works OK targeting ESTK (running in ESTK, obviously), but it works different targeting InDesign.
How can i get scriptUI to select the contents of the first textbox when tabbing into it?
ScriptUI isn't perfect. Sorry, but there are some quirks. Note that ScriptUI acts slightly differently in ID than in the ESTK. For example, when validating entries in an edit text, I like to turn the background color of the text box to red if they enter an invalid value. Works in the ESTK, works in Bridge, doesn't work in ID.
ouch... well, we'll have to live with that then...
thanks for telling me...