Can I re - open a dialog when a user clicks the Ok button?

Hi all

I would like to catch missing entry (selection of the menu drop-down) in an Illustrator scripted dialog box and return the user to the dialog box, as it was before he clicked on ok.

Now the script logic goes in this direction:

var windowResource = "dialog {------}.

text: "Batch Converter,------."

maximizeButton:true,------.

assets: true\

{resizable: true} ';

var aDialog = new Window (windowResource);

Add all sorts of UI elements

[...]

Display dialog box

var returnValue = aDialog.show ();

user clicked ok

If (returnValue == 1) {}

Search for user input

-> reopen dialogue if there is something missing

}

the user clicks Cancel
else {}

aDialog.close ();

}

I really don't want to mess with the custom event handlers, just go back to the original dialog box seems the simplest and the easiest to use right now.

Is it still possible?

See you soon,.

Mike

Another method that I like is to disable the ok button until all the requirements.

I just made some changes to W_J_T code to make it simple to see the differences

function test() {
    var w = new Window("dialog", "Drop Down List");
    w.margins = 25;
    var txt = w.add("statictext", undefined, "Select A Drop Down Item:");
    var dropArray = [];
    for (var i = 1, l = 50; i < l; i++) {
        dropArray.push("Drop Down List Item = " + i);
    }
    var dropList = w.add('dropdownlist', undefined, dropArray);
    dropList.onChange = function() {
        if(dropList){
            okBtn.enabled = true;
        };
    }
    var okBtn = w.add('button', undefined, 'OK');
    okBtn.preferredSize = [200, 25];
    okBtn.enabled = false;
    okBtn.onClick = function() {
            w.close();
    }
    w.show();
}
test();

Tags: Illustrator

Similar Questions

  • Opening a dialog box LOV on click of a button

    How can I open a dialog LOV at the click of a button?
    I tried to put javascript:fun() request button highlight, but it did not work.
    can it be done using branches?

    Abhishek,

    Unfortunately, the switch position of the region will not work as the only submission. But guess what, we don't have no need to have an element or an Apex button "put" a button on the page!

    Go to your text element in the element text Post put code like this:

    <span><input type="button" value="Click Me" onclick="myFunction"/></span>
    

    You can use a button or image for a more "custom" look As for the value of the button, you can update via your JavaScript code.

    Kind regards
    Dan

    http://danielmcghan.us
    http://sourceforge.NET/projects/tapigen
    http://sourceforge.NET/projects/plrecur

    You can reward this answer by marking as being useful or correct ;-)

  • How can I change several movieClips properties when a user clicks a button?

    It sounds like something I should already know, but I'm working on a UI that I want to be skinable.  I have about 8 different graphic elements and I want to change the appearance of these 8 different movieClips simply by clicking a single button.  I thought that I simply create a new keyframe in my main timeline and then manipulate the clips but that changed the appearance of the clip on frame 1 as well.  Details: I want to change the color of my UI background and I want to change the color of some clickable images as well.  I want to frame 1 to have a white background and frame 2 to have a red background.  What I do need to create several video clips and drag them on my stage or can I just use the existing since movieClips all I really want to change the colors?

    Thank you.

    If you want the ide to create new movieclips or new frameworks in old movieclilps, then do it.  My guess is that you will find it easier to add new images to your movieclips to add new clips.

  • I want to open the background app after clicking the ok button in the alert illustrated?

    I have an application I have let down in the background.

    After awhile, I show an alert for help:

    synchronized(Application.getEventLock()){
                            UiEngine ui = Ui.getUiEngine();
                            Screen screen = new Dialog(Dialog.D_OK, "Alert!", Dialog.OK
                                                        , Bitmap.getPredefinedBitmap(Bitmap.EXCLAMATION), Manager.VERTICAL_SCROLL);
                            ui.pushGlobalScreen(screen, 1, UiEngine.GLOBAL_QUEUE);
    }
    

    After this code, I add this, but the background application opens instantly, no waiting user click on the ok button:

    UiApplication.getApplication().requestForeground();
    

    How can I take the app in the foreground after the user clicks the ok button?

    Seek to create a DialogClosedListener and make your first query in this plan.

  • How to open 2 sites on start and 1 Web site when you click the home button?

    How to open 2 sites on start and 1 Web site when you click the home button?

    You can change your shortcut on the desktop Firefox with two starting URLS. To try:

    • Shortcut on the desktop: right-click on the icon, choose Properties
    • Icon taskbar pinned: clic click right on the icon, right click in Mozilla Firefox, click on properties

    Windows normally selects the shortcut tab. If this is not the case, go ahead and click on the shortcut tab.

    You will see the target highlighted. On 64-bit Windows, which is usually either not less the following:

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
    

    For the specific shortcut launch pages, you can add them to the end, for example:

    "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -url "http://www.dilbert.com/" -url "http://www.gocomics.com/pearlsbeforeswine"

    After OK'ing the Properties dialog box, you can test everything right now to confirm that Firefox is now launching a window with tabs. Either:

    • Double-click the shortcut on the desktop
    • right click on taskbar icon pinned, click Mozilla Firefox

    Who do you want?

  • When click the "back" button after filling out web form, I can't, a message says that Firefox must send information that will be rpeat any action... Why can I go back?

    My current Firefox is version 9.0.1 update
    "when I click on the"back"button after filling web form or make payment online etc, I can't go back to my homepage, if I press the BACK BUTTON (arrow) a message said.
    "Firefox must send information that will repeat any action (for example, a search or order confirmation) that was carried out earlier.

    I don't want to re - order or repeat the process over. The only thing I can do is to leave Firefox and start again which is very painful.

    Any solution will be appreciated.

    Older Firefox had this coming message in case you have used the back to go to a page that is requested from the server with the POST data specific to a form previously sent.

    You receive an alert to send POST data if you return to a page or refresh a page that was requested in advance from the server by submitting form via a (hidden) MESSAGE form data.

    Firefox can only make sure to get the same page send this POST form.

    Firefox doesn't know what it means shape data, so Firefox asks for confirmation before sending the form data so action can you take to repeat an action and buy another article or post a message once.

    A way to prevent that pop up is not to use the back button, but to open the links on a page that have been requested from a server by sending a MESSAGE form in a new tab (window) with a middle click or a Ctrl + left click.

    Then you can close the tab or window to go back.

  • I have photoshop cc 2015. For the last 2 days it does not open when I double click the icon. What should I do?

    I have photoshop cc 2015. For the last 2 days it does not open when I double-click the icon. What can I do to fix this?

    OK completely reboot Windows 7. When he started to look in the Task Manager under process for photoshop.exe it shouldn't be there. If it is highlighted and press the button end process. Now right-click the Photoshop icon and select run as administrator. Photoshop starts, you should see photoshop.exe in the list of running processes. When you close Photoshop it should disappear from the list.

  • Why the file opens when I double click the icon?

    Why the file opens when I double click the icon?

    Restart your Mac and try again.

  • Can't let site when I click the back button, it keeps just returning on the site, have to close firefox and try again.

    Can't let a Web site when I click the back button, it keeps just returning on the site, have to close Firefox and restart my search.
    The website below is just an example, it is a little more.
    Is this a problem with Firefox or this particular Web site?
    Thank you for your help.

    I thank very you much for trying to help me.
    I think you pointed me in the right direction, I tried on IE (ugh!) and he worked there. It's been awhile that this HARD drive has been in service and I think it's time to do a clean reinstall of everything.
    Once again, thank you.
    fredsbroke2

  • I have a Dell Inspiron 531, I can't Panda titanium to download when I put in the disk drive. Why the habit of this work? I don't have an error message, but my computer says that there is a threat in my computer.

    I have a Dell Inspiron 531, I can't Panda titanium to download when I put in the disk drive. Why the habit of this work? I don't have an error message, but my computer says that there is a threat in my computer.

    http://www.pandasecurity.com/homeusers/support/

    Link above is Panda Support for installation issues, etc...

    http://support.pandasecurity.com/Forum/

    Forums of users Panda at the link above.

    They will help the Panda support above links.

    See you soon.

    Mick Murphy - Microsoft partner

  • I had to redo my computer why can't use my product key when I installed windows, the first time

    I had to redo my computer why can't use my product key when I installed windows, the first time

    How to solve the error codes on Windows 7 0xC004C008 Activation of Volume
    http://Windows.Microsoft.com/en-us/Windows7/Windows-7-activation-error-0xC004C008

    Have you tried to restart by phone?

    How to activate Windows 7 manually (activate by phone)
     
    1) click Start and in the search for box type: slui.exe 4
     
    (2) press the ENTER"" key.
     
    (3) select your "country" in the list.
     
    (4) choose the option "activate phone".
     
    (5) stay on the phone (do not select/press all options) and wait for a person to help you with the activation.
     
    (6) explain your problem clearly to the support person.
     
    http://support.Microsoft.com/kb/950929/en-us

  • What settings can I change my captivate program so that when a user does the program into an LMS they are marked as being completed when they hit a specific slide (not a number of slides) or the percentage of slides

    What settings can I change my captivate program so that when a user does the program into an LMS they are marked as being completed when they hit a specific slide (not a number of slides) or the percentage of slides

    I have duplicate slides that the user can jump. When they do the program is marked as progress when really, they have seen everything but technically not each slide.

    I wish that the LMS to makr as complete when they consult the last slide so that they are marked as being completed independently to know if they jumped the previous slides.

    Thank you. In fact, I managed to find a solution that does not require the user to press the button! You can add an action to a slide itself using Javascript execution on success. In the Script window, you add that scorm_setcompleted() and that tell of the SGA to mark the complete project on enter on this slide. So that's what to do if someone reads this

  • Computer froze cannot open any programs or even to use the Start button to turn off.

    Original title: the computer froze.

    Original title: my computer (Windows XP) has frozen. -Big problem -)

    Hello

    Last night, I used my computer to open a load of bunch of programs of MS Access (probably asked to run a marathon when he can only walk!)

    Now, I can't open any programs or even to use the Start button to turn off. How can I fix this problem or you have lost everything :-(

    Thank you

    Thanks - all of a sudden he started working again! Maybe this was a vacation - but I tried F8 and safe option is not come to the top.

    Very old computer - but it is useful to use to return to historical documents that I don't want on my new computer.

    Tnanks for the long and dedicated response :-)

  • My portfolio is currently configured to allow access when locked. I used to be able to double-click the home button and seems my card and I would enter my access code. I have updated to IOS 10 and I am no longer able to do this.

    My portfolio is currently configured to allow access when locked. I used to be able to double-click the home button and seems my card and I would enter my access code. I have updated to IOS 10 and I am no longer able to do this. All the settings are there. I have an IPhone 6.

    Are? you double click in front of the screen of the iPhone are? (pending). This is what seems to work for me.

    I hope this can help.

  • I want to have a form of lead pop up when a user clicks on an ad on Facebook, Google, etc, but not when a user organically finds my site. I have to create a whole new separate landing page?

    I want to have a form of lead pop up when a user clicks on an ad on Facebook, Google, etc, but not when a user organically finds my site. I have to create a whole new separate landing page?

    "Great sites" with additional technologies can easily intercept incoming requests to a certain page, with all sorts of additional information in the URL (from the related announcement, like this: http://typekit.com/fonts?locale=nl-NL&ref=globalnav&promoid=KRUVR ) and whisk a popup, refer to a different page or activate another script or process of deciding what must happen. But Muse creates a 'static' website with the URL of the page simple, without special scripts or ruffles or processes to decode an additional URL to a query.

    Creating a page of special destination somewhere elsewhere in the Web site to refer to, may be the simplest solution.

Maybe you are looking for

  • Import analog Video8 through Firewire and Digital8 camcorder problem

    Hello! I've got a few Video8 tapes from a Sanyo camcorder that's dying, so I bought an old camcorder Sony DCR-TRV480E to eBay which allows to capture Digital8, but also reading and listening to the Video8 and Hi8. I finally got the camcorder and trie

  • Firefox Sync does not work for Tablet Android Nexus 10.

    Firefox Sync works for 2 PCs, but does not work for an Android tablet. It is said, that the tablet was connected successfully, I checked the bookmarks and history options to be synchronized and or bookmarks, or history of the browser has not been upd

  • Tool for Toshiba to write some information about Setup / pre boot OS

    long under XP, I used a kind of tool of Toshiba that I can write some 'information/text' on the boot process text that appears before the Bios password. Since Win7 can find this tool once again, (Toshiba Assist / another version of supervisor passwor

  • Qosmio G30-126 - black screen after the awakening of the mode standby

    Hello If I just put my Qosmio G30 - 126 mode (button or just close the housing cover) sleep it start back only with black screen. HD is being run but nothing else. I have to turn it off and start again with the start-up. Of course come screen with me

  • Helps the Windows Activation

    Hello? Yes, uh... This is my first time posting here so please forgive me if this seems a bit informal... Uh, well well, in any case, me & my dad recently replace the HDD on our PC when he eventually be taken by a pretty nasty virus. We have changed