At last! Real ScriptUI manual is alive thanks to Peter Kahrel, all that wrapped up into search able PDF with example pictures on the side.
Here is part of announcement from Peter’s page:
We are going to look at simple way to get all text variables. Important thing is that InDesign had two different lists of text variables. One list is stored in ‘app’ object, and another is in ‘document’ object. This is very important to remember! Part of this script was published on Adobe’s InDesign scripting forum by Peter Kahrel. So, let’s get started.
This is very great and handy script! If you have lot of text or numbers, regular alert dialog just roll text out of the screen, and you can’t see them. Here is an example from “ScriptUI for Dummies”, which is a more useful version of alert: it shows text in a scrollable window. An additional advantage is that you can copy text out of the alert. This was posted on Adobe’s InDesign scripting forum.