How to show the dialogs in Indesign?

hi to all,
I tried these script to show the dialogs but it doesn't work at all!
$.writeln(app.dialogs.length);
app.dialogs.everyItem().destroy();
//for(var i=0;i<app.dialogs.length;i++)
//     app.dialogs[i].destroy();               //These also i tried//
var myDialog = app.dialogs.add({name:"Simple Dialog"});
//Add a dialog column.
with(myDialog.dialogColumns.add()){
staticTexts.add({staticLabel:"This is a very simple dialog box."});
//Show the dialog box.
var myResult = myDialog.show();
//If the user clicked OK, display one message;
//if they clicked Cancel, display a different message.
if(myResult == true){
alert("You clicked the OK button.");
else{
alert("You clicked the Cancel button.");
//Remove the dialog box from memory.
myDialog.destroy();
i also attaced this script with this forum...
help me...

Hi R_Thangaraj,
your code works very well for me.
Try to insert the following line at the top of your code to reactivate the user interaction level:
app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll;
Martin

Similar Messages

  • How to stop the Dialog from being dragged

    I was hoping that someone could tell me when calling a Dialog from Jframe, a how to stop the Dialog from being dragged
    while a dialog is showing.
    When it is visible I can still click and drag the Dialog
    I want to set it so you can not drag it until the dialog has be closed.

    If you don't have access to the parent frame, a "hack" that usually works:
    Frame frame = Frame.getFrames()[0];
    if (null != frame && frame instanceof JFrame){
    JFrame jf = (JFrame)frame;
    JDialog jd = new JDialog(jf, "title");
    ... code here ...
    As each JFrame (or Frame) is opened, its stored in the array of Frames that you can get. Same thing with Dialog.getDialogs(). Almost always, at least so far for me I've never had this problem, the [0] index is the main window opened, or the parent/top frame. I'd put the check in there to be safe and make sure its a JFrame and usually you'll only have the one JFrame.

  • How to show a dialog in fullscreen mode

    My main class is a JFrame, with a JTree in the left and panel in the right.
    one of the right panels has to show in fullscreen mode, here is the code:
    GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
                    GraphicsDevice gd = ge.getDefaultScreenDevice();
                    JWindow win = new JWindow(gd.getDefaultConfiguration());
                    win.add(currentPanel, BorderLayout.CENTER);
                    //the currentPanel here is the panel on the right of the JFrame
                    gd.setFullScreenWindow(win);
                    win.validate();then i want to show a dialog on the fullscreen, which u noe, we have to give (Frame, modal) to the JDialog, so i could only give the dialog the JFrame beneath the fullScreen panel as the dialog's parent......then the dialog wont be shown.....How can i show the dialog?
    Best Regards

    Then setUndecorated(true) and then do what the previous post said.
    You probably would then want to give your user a way to get out of it.

  • How to show the quantity in decimal in MIGO

    Dear expert,
    How to show the quantity in decimal in MIGO?? for example in material BOM the quantity is 12.480 but the quantity in MIGO is 13. it's automatically rounded.
    what should I do to show the decimal point in MIGO?
    Thanks
    Pauline

    Hi,
        Please check in su3 -
    defaults (Tab) -
    Decimal Notation.
        Change the decimal notation and logoff and login to apply the changes.
        I think it may help you.
    Regards
    Sreedhar Reddy

  • How to place the images in Indesign xml file by Javascript?

    How to place the images in Indesign xml file by Javascript?
    We got the Indesign xml file, how to give the image placement link by Indesign javascript? Please help me its urgent.

    Hi,
    You can pass the image url as a href attribute=> file:///Users/me/Documents/my_pic.jpg directly within your xml. It just needs that you pass a local, static and valid url.
    If you want to add image later once the xml is flowed and so target specific nodes and inject images, it's a bit more complex. If the node is not part of the layout, you may try to reach the XMLElement objet and such an attribute, then layout the element.
    var x = some XMLElement
    x.xmlAttributes.add("href","file:///Users/m/Documents/my_pic.jpg" );
    If already placed, then you have to get the associated pageItem, then place your file into it.
    pagItm.place ( File ( "/Users/m/Documents/my_pic.jpg" ) );
    Hope that helps,
    Loic
    http://www.loicaigon.com

  • How to get the dialog of select ODBC source

    how to get the dialog of select ODBC source which system provide.

    JNI.
    Or buy/find a library that does it for you (using JNI.)

  • How to show the checked-out symbol in list of files in a folder

    Hi,
    When the folder is selected it is showing all the files in that folder. But, the user would not know which file had been checked out. In general it should show the lock symbol (As similar to Documentum, webtop) when a file had been checked out by some other user.
    How to show the lock/key column in list of files. Any other way to find a file had been checked out or not instead of going into the content information.
    Also, how do we add additional columns like author etc... to the list of files screen in UCM?
    Please help

    You should double check, but I don't believe that the check-out info is in the resultset. Because that information isn't available, the state of each row in the search results table cannot be defined. So, the first hurdle would be to add that info to the dataset.
    The second hurdle would be to alter the UI to leverage that info (e.g., the key icon when checked out).
    If you're looking to alter the folder views, then look to the COLLECTION_DISPLAY service & related template. Other views (e.g., search results) have different templates and backing services.
    -ryan

  • How to show the login user Id in the upper right corner of each page?

    Hi,
    I was wondering how to show the login user Id in the upper right corner of each page?
    thanks so much!
    cchu

    Cchu,
    The easy question first: applying a style to the welcome message. If you look at the page source, you'll see that #WELCOME_USER# is expanded to <div class="app-user">Welcome: DEMO</div> So to change the style of the message, you need to tweak the style of the app-user div in your CSS, or override it in a style block in your HTML header.
    Now, the tougher question: why the text is wrapping for you. And, really, without seeing your entire page, I can't give a full answer. But I'd suggest that what's most likely happening is that the table column you're putting it in is too narrow, so it's wrapping; try replacing the td tag with <td nowrap="nowrap"> This will force the column to be wide enough to display the full message, but might result in weird formatting elsewhere on the page (depending on what all is in your table).
    -David

  • How can show the result of a measuring that is done in a sub-program in my main panel?

    How can show the result of a measuring that is done in a sub-program in my main panel?

    In your subvi, wire the result(s) you want to ouput to the main program to an output terminal on the connector pane.
    For a tutorial on subvi's, search the help for "connector panes" anc click on tutorial.
    ~Tim

  • How to show the message text for constraint violations

    Hi all,
    In a batch procedure a primary key is violated (ORA-00001). For the primary key, a message is recorded in the TAPI and the message table.
    How to show the enduser a proper message text instead of the ORA-00001.
    We are using Designer 6 with Headstart 2.1.2.
    Thanks in advance,
    Joep

    Joep,
    If you try to insert the record by calling the ins procedure of the Table API, you will see that it will result in an ORA-20998 message, which means that the error message details reside in the CG$ERRORS plsql message table. These messages can be extracted e.g. with the messages.sql script, shipped with headstart.
    If you do not want to rewrite your direct DML (insert into [table name] ...) in the complexer calls to the TAPI services, you might want to user VAPI's for it. In fact, this is one of the major advantages of using VAPI's.
    The CDM guidelines volume, chapter 6 states that:
    <I>The front end no longer needs to trap declarative constraint
    errors (Primary Key, Unique Key, Not Null and Check
    Constraint violations) and replace them with a user-friendly
    error. The View API issues DML statements through the TAPI
    and the TAPI traps all declarative constraint errors, and puts
    user-friendly message on the stack, in the preferred language of
    the user! Fore more information, see the section, Completeness
    of Rule Violations Reported in Front End, in this chapter.</I>
    So the only thing you need to do is generate VAPI's, and trap the ORA-20998 message (qms$errors.qms$exception) in an exception handler, where you retrieve the user friendly messages from the message stack!!
    Regards, Marc

  • How to show the elements of an array?

    How to show the elements of an array, when the array size changes every loop?
    It's possible to use node property?
    thanks
    Vicens
    Win XP/ LV7.1
    Attachments:
    show elements.PNG ‏184 KB

    Basically it is (at least in LV8.0). There is a property "Number of Rows" which sets the number of visible rows. If your 1D array is placed horizontally, use "Number of Columns".
    Using LV8.0
    Don't be afraid to rate a good answer...

  • How to show the filter and sort capabilities in adf dynamic table

    hi
    how to show the filter and sort capabilities in adf dynamic table..
    Pls help me

    Hi
    Click on a colum in your table and go to the properties pallet
    make true the sortable property then you can sort the table according to that column
    Thanx
    Padma

  • How to show the drill path in the analysis

    Dear Experts:
    I encountered this problem when designing OBIEE dashboard:
    I'm using OBIEE 11g.
    I ceated a new analysis and made it to show in pie chart view.
    It works fine regarts to the drill function, when I click a part of it, it automatically change to the drilled down level figure.
    Whant I want to know is how to show the current level after serveral times of drilling down and drilling up.
    I know that I can judge the level base on the legend or move the curs over the chart.
    But to a new user, is it possible to create a variable or something above/below the chart to actively show the name of current level?
    Thank you very much.
    Edited by: 906129 on Jan 5, 2012 5:40 PM

    How could it not be 5A?. If you have A for each member and then you select 5 members you are going to get 5A. If you don't want 5A then what do you want the Avg of A across the 5 members?
    The tools are working the way they are designed to, your requirement is a little out of the ordinary. Unfortunately, Web Analysis does not have conditional logic.
    Try taking my previous suggestion and adding another member in Essbase called "Count", make it dynamic calc and the formula should be ' 1; '
    The purpose here is to get a value of one in the count member for each member you are going to select in your filter. So, if you select five members in the filter, Web Analysis will now return 5A and it will return the result of "Count" which will be 5. Create a calculated member that divides the 5A value by the count value 5. That will give you the average A for the 5 members, then you can divide by 12.

  • How to show the cover art in the sidebar?

    Hej!
    I just updated iTunes to the latest version and wanted to make it look like before and already managed to enable the side and status bar.
    Now to my problem: I just can't find out how to show the cover art of the selected/playing song in the sidebar...
    If they didn't remove this option, please let me know how to enable it.
    - Julia

    I was able to somehow pull the single tool column down and get it to show as a double column. I am not sure as to exactly how I did this, but I did get the double column tool box and so far it has remained. There is some gray column overlap at the bottom of the screen.

  • How to show the volume in a Meter?

    Hello,
    I m newbie in programming in java sound,
    And i would like to know how to show the volume from a recording in real time in a meter? I allready have the meter but now i don´t know how to pass the volume and show in the meter.
    Somebody can help me?
    Thanks

    844429 wrote:
    ..And i would like to know how to show the volume from a recording in real time.. It can never be truly 'real time' since the calculations require a 'chunk' of sound samples to produce a value. The shorter the chunk, the more arbitrary the value, but the more 'real time' it seems.
    ..in a meter? I allready have the meter.. (chuckle) That is the easy part.
    ..but now i don´t know how to pass the volume and show in the meter.In what units? dB, RMS, tuna? I did an RMS calculation for the left/right channels of a more complex audio trace. RMS is relatively easy to calculate. E.G.
    /** Computes the RMS volume of a group of signal sizes ranging from -1 to 1. */
    public double volumeRMS(double[] raw) {
        double sum = 0d;
        if (raw.length==0) {
            return sum;
        } else {
            for (int ii=0; ii<raw.length; ii++) {
                sum += raw[ii];
        double average = sum/raw.length;
        double[] meanSquare = new double[raw.length];
        double sumMeanSquare = 0d;
        for (int ii=0; ii<raw.length; ii++) {
            sumMeanSquare += Math.pow(raw[ii]-average,2d);
            meanSquare[ii] = sumMeanSquare;
        double averageMeanSquare = sumMeanSquare/raw.length;
        double rootMeanSquare = Math.pow(averageMeanSquare,0.5d);
        return rootMeanSquare;
    }Of course, you will need to get directly into the sound data streams then convert the signal to PCM, split the channels and scale the values to a range of -1 to 1 to use that exact method shown. ;)

Maybe you are looking for

  • Acrobat Standard 9.0 GPF failure starting scanner

    Windows XP SP3. 2GB memory, many tens of GB free disk. Acrobat Standard 9.0 blows up at "Create - From Scanner". Selecting any menu mode, grayscale, color, immediately blows up with GPF, and it gets no farther. No selection box appears about from whi

  • Change Master Page based on Text Content

    Hello, I have found a few examples relating to changing Master pages based on Style. However, I would like to change all Pages that flag "True" with the query of the "2-1134" to to "Master-C" for example. I have 12 master Pages with different strings

  • ITunes Randomely opens by itself

    My iTunes automatically opens all by iself when i try to close it. Once I close it, about 2 minutes later it opens again. I can't get it to stay closed and this problem is really starting to irritate me, I don't know what could be the problem and why

  • Can any one tell me if i can trace my lost ipod touch

    I have been unable to find my ipod touch 4 can i trace it see if its being used?

  • Sorting permutations

    Hello. I was hoping if someone could help me with this. i have a two dimensional table , with elements such as {{1,2,3,4,6,7,9},{4,6,7,8,9,10,11},{1,2,3,5,6,8,12}}. now i wanted to search for permutations of the lenght i chose. if i type 3, it will r