Skip navigation
Currently Being Moderated

ScriptUI for dummies

Oct 12, 2010 6:09 PM

I've been putting together a text on ScriptUI, to a large extent to clear up things for myself (hence the title!). It's an introduction to ScriptUI, much of it very basic, here and there going into some detail. It's not a finished product, and comments, suggestions, and corrections are welcome. If you're interested, you can find the PDF file here: http://www.kahrel.plus.com/indesign/scriptui.html

 

Peter

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Oct 12, 2010 7:36 PM   in reply to Peter Kahrel

    Great!!!

     

    It's very helpful.

     

    Peter, thanks alot for all of your hard work.

     

    Shonky

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 12, 2010 9:01 PM   in reply to Peter Kahrel

    excellent stuff. going through it now to see if i can convert an HTML-based calculator that i made so i can output the results straight into indesign.

     

    have noticed one thing which i think might be a typo though. on page 6 (8 of the pdf) there is a heading "Two ways of addressing controls" and rather than paragraphs of type, just the letters "aa".

     

    am i missing something here?

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 12, 2010 10:44 PM   in reply to Peter Kahrel

    Peter,

     

    On page 6 (Pdf Page 8) under "Formatting the window frame" myPanel not declare so its giving error.

     

    I have declare myPanel and working fine.

     

    myWindow = new Window ("dialog", "Example", undefined, {borderless: true})
    var myPanel = myWindow.add("panel", undefined)
    myPanel.add ("statictext", undefined, "borderless: true");
    myWindow.show ();
    

     

    Shonky

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 12, 2010 11:42 PM   in reply to Peter Kahrel

    WOW!

     

    Peter, this is really great!

    Great tool for beginners, but for pro's also!

     

    PS.

    thanks for listing my blog!

     

    --

    tomaxxi

    http://indisnip.wordpress.com/

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 13, 2010 4:35 AM   in reply to Peter Kahrel

    Awesome!!!

     

    It's really great & helpful.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 13, 2010 5:45 AM   in reply to Peter Kahrel
    "The best way to become acquainted with a subject is to write a book about it."
    Benjamin Disraeli
    British politician (1804 - 1881)
     
    |
    Mark as:
  • Currently Being Moderated
    Oct 13, 2010 7:10 AM   in reply to Peter Kahrel

    Nice work, Peter! Something like that has been needed since CS2.

     

    If you'd like some help on some of the more advanced topics (embedding a png in your script, validation), drop me a line.

     

    Bob

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 13, 2010 7:57 AM   in reply to Peter Kahrel

    Very, very nice.

     

    I wish I had the time to read it through more thoroughly, but on a quick look through, it appears to be very well done (like usual)!

     

    Harbs

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 13, 2010 8:29 AM   in reply to Peter Kahrel

    Excellent book — short and sweet.

     

    Kasyan

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 14, 2010 8:36 AM   in reply to Peter Kahrel

    thanks Kahrel, good stuff.

     

    expecting more from you

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 14, 2010 2:08 PM   in reply to Peter Kahrel

    ".. Jongware's fabulous CS object browsers .." (cough)

     

    Is there a way to create (or mimic) radio button selection groups?

     

    Screen shot 2010-10-14 at 11.05.33 PM.png

     

    In this script I'm working on (for Illustrator!), I'd like to have either a full choice of attributes in the panel, or simply "Match teeth size". I'd like something like a radiobutton at the top of the panel, as well as one instead of the checkbox -- if the panel radiobutton is selected, the attributes should be editable, but disabled when it's not.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 14, 2010 3:55 PM   in reply to Peter Kahrel

    Awesome!

     

    I have been struggling with the lack of informative examples on this subject!

     

    Like your previous works, it is very simple to understand yet complex enough to assist the more accomplished scripters.

     

    I did find a minor glich on page 22:

     

    The hyperlink: "Gabe Harbs's script" points to this url: "http://www.kahrel.plus.com/indesign/sidenotes.html"

     

    I do not know if this is the intended target.

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2010 12:08 AM   in reply to Peter Kahrel

    Re. "Match Teeth Size":

     

    I'd probably do it Peter's way as well, but IIRC you don't need to enable each one individually. You can just enable/disable the parent panel...

     

    Harbs

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2010 1:28 AM   in reply to Harbs.

    Thanks, guys; I used both of your suggestions! (Ever needed to draw gears? There is an Illustrator script for it now -- I don't think it would be useful as an ID script)

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2010 2:35 AM   in reply to [Jongware]

    Thanks, Peter, for the PDF -- I'll get there eventually!

     

    And thanks, Jongware, for the script. Beautiful, beautiful cogs! BTW, for maximum "joy of mesh" I find myself widening the "valleys" between the teeth to match the width of the "plateaux":

     

    Screen shot 2010-10-15 at 10.31.00.png

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2010 2:55 AM   in reply to Jeremy bowmangraphics

    (Veering Off-Topic -- sorry, Peter!)

     

    Jeremy, can you put some numbers to that? Technical documentation on how to actually create gears is a bit hard to find, so I wrote the script to create "mirrored" hills and valleys with the exact same width. Theoretically, if you would draw them as straight lines, they'd match up perfectly. In practice, however, it seems to need a bit of 'pushing'. I don't think the script is accurate enough to design clockwork with -- but I'd sure like it to be!

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 15, 2010 2:57 AM   in reply to [Jongware]

    (We might as well continue this discussion in the Illustrator forum: [CS4/JS] Gear up! A gear drawing script -- to keep it "On topic".)

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 16, 2010 10:31 AM   in reply to [Jongware]

    [Jongware] wrote:

    Jeremy, can you put some numbers to that?

     

    Alas no... not yet, but I'm thinking about it. I'm trying to write something for InDesign that (probably) follows an entirely different method from your script, and whose results will be much more modest (at first, I'm just going for a simplistic "fortification line"). I thought if I had something of my own that works in InDesign, I might be able to work my (beginner's) way into Illustrator's object model, something I am wholly unacquainted with so far. That's why I'm replying here rather than in the Illustrator Scripting forum.

     

    Thanks again!

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 19, 2010 11:12 PM   in reply to Peter Kahrel

    Hi,

     

    i'm very new with scriptui, i tried the example in the PDF but end up having a blank dialog...

     

    result:

    blankdialog.jpg

    code here

    var myWindow = new Window("dialog");
    var myMessage = myWindow.add("statictext");
    myMessage = "Hello world";
    myWindow.show();

     

     

    pls advice..

    Thank you so much...

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 19, 2010 11:38 PM   in reply to eboda_snaf

    Hey!

     

    You forgot to add 'text' property to myMessage

     

    myMessage.text = "Hello World";

     

    Hope that helps.

     

    --

    tomaxxi

    http://indisnip.wordpress.com/

     
    |
    Mark as:
  • Currently Being Moderated
    Oct 19, 2010 11:45 PM   in reply to Marijan Tompa

    Oops.... i'm soo embarrased by that...

     

    Now it works!!!

    Thank you soo much...

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2010 12:21 AM   in reply to Peter Kahrel

    We should build a statue in your honour

    Thank you so much for that wonderful guide. Adobe should be inspired for their own scriptUI documentation.

    Ok I am a little bit enthusiastic but I really enjoy your book !

     

    Loic

     

    PS: And thanks a lot for the reference to my websites

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2010 7:35 AM   in reply to Loic_aigon

    Hi Peter -

     

    This is a VERY valuable resource for folks, thanks for taking it on!

     

    One very minor correction on the site, ScriptUI was first shipped in CS2.

     

    Bob

     
    |
    Mark as:
  • Currently Being Moderated
    Dec 15, 2010 7:45 AM   in reply to Bob Stucky

    In Photoshop it was CS2. InDesign was CS3. What was it in Illustrator?

     

    Harbs

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 18, 2011 6:55 AM   in reply to Peter Kahrel

    No, you didn't.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 18, 2011 9:27 AM   in reply to [Jongware]

    Your right, Jong. It's listed as the 1.4 update but downloads as the 1.3. My bad.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 18, 2011 10:29 AM   in reply to Peter Kahrel

    Peter, there is still something wrong with link.

    I get 404 error when trying to download PDF.

     

    --

    Marijan (tomaxxi)

     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points