Canceling Dialog Box after a button is pushed

The problem I have is I open the dialog box and push my button to call another script to run.  But if there is an error the error is hid behind the dialog box.  I would like to Call the dialog box, push button and then close my dialog box before the script runs.  Can that be done.
So far I have tried this and can get it to do what I want.
SubButton4_EventClick(ByRef This) 'Created Event Handler
CallUIAutoRefreshSet(0)
Call dialog.cancel
Callscriptinclude ("D:\_Calterm_Configuration_Files\Technical_Information\DIAdem_Scripts\Insite_DataLog_FileLoader.VBS")
CallUIAutoRefreshSet(1)
End Sub
Solved!
Go to Solution.

Hi J,
If you're willing to have the SUDialog close to unubstruct the view of a potential error dialog, then why not conditionally call the next script right after the SudDlgShow() command in the script that calls the SUDialog?  If the user closes the dialog with the Cancel action, you don't run the script, but if they close with the Ok action, you do-- like this:
Response = SudDlgShow("MyDialog", CurrentScriptPath & "MyDialogFile.SUD")
IF Response = "IDOk" THEN Call ScriptStart("MyScriptPath")
Brad Turpin
DIAdem Product Support Engineer
National Instruments

Similar Messages

  • Cancelling Dialog Box

    I'm launching a dialog box from a page and this dialog box has two buttons. There is one button that uploads a file (i.e. performs an action) and another that will close the dialog box. On the close button I call the returnFromDialog and the calling page has a return event/listener that performs an action upon returning from the dialog box. However, if the user clicks on the "cancel" (red x on the dialog page) on the dialog box and not the close button, the returnFromDialog isn't called and the calling form doesn't execute the return event/listener... I need the return event/listener to run regardless of whether the user closed the dialog box by pressing the coded Close button or by using the default cancel button on the dialog box. Is there anyway to know the user pressed the cancel on the dialog box to return to the calling form?

    Hi,
    you could set a session flag before calling the dialog and have this flag being reset when the return from dialog listener executes. If the flag is still set then you e.g. can alert this as an error upon the next user action (and then reset the flag)
    Frank

  • How do you Re-Open the Camera Raw Dialog box after closing it?

    Hi All,
    going crazy trying to figure out how to reopen the Camera Raw dialog box after closing it in photoshop. I know I found it once but have since forgetten. Any help would be much appreciated!
    thx!
    Jayson

    When the image is open in ACR hold down the SHIFT key and you'll see the button marked Open Image changes to Open Object, so do your ACR adjustments then hold down shift and click Open Object - your image will open as a Smart Object in Photoshop.
    If using Lightroom you can right click the image and select Edit>Open as Smart Object in Photoshop from the drop-down menu.
    Do not confuse normal smart objects with what we're talking about here, Camera RAW Smart Objects - possibly one of the most powerful tools to have at your dispossal, once you understand them.
    Hope this helps

  • My AI program (CS5 Illustrator 15.1.0) will not open some PDFs. It was working just yesterday, but now will only open a PDF if the graphics of the PDF is visible in the box that appears in the lower left corner of the dialog box after you click Open. The

    My AI program (CS5 Illustrator 15.1.0) will not open some PDFs. It was working just yesterday, but now will only open a PDF if the graphics of the PDF is visible in the box that appears in the lower left corner of the dialog box after you click Open. The file size does not seem to matter. Any ideas?

    Hello Kathie,
    Sorry for the inconvenience that has caused to you.
    Please let me know if you have tried converting any other PDF to word with Reader.
    Alos, please sign up at "https://cloud.acrobat.com/" using your Adobe ID credentials. Click on 'ExportPDF' tab and upload the PDF that you want to convert to Word.
    Let me know if this converts fine.
    Hope to hear from you.
    regards,
    Anubha

  • No "Add DAQ Component" Dialog box after creating new project

    I'm using VS2012 and have installed Measurement Studio, NIDAQmx, drivers, VISA. When creating a new project in Visual Studio, I do the following:
    1. Select C# > Measurement Studio
    2. Select NI Windows Forms Application
    3. Give the project a name
    4. Click OK
    5. Measurement Studio Class Libraries window pops up and I check the boxes
    The project loads fine but I keep readin about an "Add DAQ Component" dialog box after doing the above steps. Since I don't have the box, I can't create new tasks (without writing th actual code). What am I missing? See attached picture for what dialog box I'm missing.

    Hi Musent,
    To see this dialog box, you'll need to create an NI DAQ Windows Application instead of a Windows Foms Application.
    Kristen

  • I have tried to install Lion. 80% download, then it raises cancellation dialog box. I cancel cancellation (twice) it aborts download as if I had cancelled it. Workarounds?

    I have tried to install Lion on a Pro. 80% download without incident, then it raises a cancellation dialog box. When I cancel the cancellation (twice) it aborts the download as if I had cancelled it.  Can't get the whole OS to download to this drive (no space issues, 500GB drive with no other files on it) Workarounds?

    Hi ppg198,
    Please try deleting the preference folder (in osx it's in "user/library/Preferences/Adobe Illustrator 17 Settings" ) and then launch Illustrator and check.
    Regards,
    Rave

  • Open dialog box at the press of push button in alv tool bar

    Hi team,
    I have created alv report displaying field contents.mean while i have created one pushbutton in toolbar at the alv report output for downloading the  data into CSV Format.
    The requirement is ,At the push of the button, a standard download dialog box should open for download to local computer. The path and file name from the initial screen should be defaulted, but possible to update on the dialog box.
    please suggest me how to create download dialog box with field as file path where i can edit the defaulted file path.
    please let me know,how can i go ahead and satisfy the reuirement or share me piece of code if you have.
    Thanks And Regards,
    Sakti.

    After the user Command you can use
    * Display save dialog window
          CALL METHOD cl_gui_frontend_services=>file_save_dialog
            EXPORTING
    *      window_title      = ' Filenema'
              default_extension = 'TXT'
              default_file_name = 'data'
              initial_directory = 'c:\temp\'
            CHANGING
              filename          = ld_filename
              path              = ld_path
              fullpath          = ld_fullpath
              user_action       = ld_result.
          p_file  = ld_fullpath.

  • How to create a Dialog Box with two buttons (Acept and Cancel)?

    Hi i am devoloping an application (an applet) that has to throw a Dialog box, if i click on the Acept button makes some thing and if i click on the Cancel button the it makes other things.
    how could i throw this dialog message...?
    Thanks.

    The following would be the code needed for your dialog box:
         JDialog dialog = new JDialog();
         dialog.setModal(true);
         //the following window listener to the dialog box is optional
         dialog.addWindowListener(new WindowAdapter(){
              public void windowClosing(WindowEvent e){
                  System.exit(0);
              }//method
         JButton acceptButton = new JButton("Accept");
         JButton cancelButton = new JButton("Cancel");
         acceptButton.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e){
                  //do what you need to do
              }//method
         cancelButton.addActionListener(new ActionListener(){
              public void actionPerformed(ActionEvent e){
                  //do what you need to do
              }//mehthod
         Container cont = dialog.getContentPane();
         cont.setLayout(new BorderLayout());
         cont.add("West",acceptButton);
         cont.add("East",cancelButton);
         dialog.pack();
         dialog.setVisible(true); I hope this would be useful
    Rizwan

  • Dialog box with one button, when clicked will launch another script

    How do I create a button inside a dialog box, which, when clicked, will open up another script?

    ]I've typed
    set myDialog to display dialog "Finished?" buttons {"Shutdown", "Screensaver"}
    if button returned of myDialog is "Screensaver" then
    run script ("Macintosh HD:Users:Seb:Applescript:ScreenSaver.scpt" as alias)
    if button returned of myDialog is "Shutdown" then++
    run script ("Macintosh HD:Users:Seb:Applescript:Shutdown.scpt" as alias)
    end if
    but it gives me an error and says "Expected end of line, etc. but found end of script."

  • Photoshop CS5 32bit No HDR Pro dialog box after merge

    Hi
    I wanted to merge 3 photos using the HDR fucnction in PS CS5. Everything seems to work perfectly, I select the files and they seem to merge but at the end when the dialog box should pop up and allow me to make adjustments it just closes down. not Photoshop... but the window with whatever it is doing and leaves me with a blank normal PS screen as if I just opened up photoshop. The dialog box never appears. I tried the 64bit version and it does work normally but the 32 bit version does not. I removes any plug-ins I put there and removed my extra actions / plug-ins folder and restarted Photoshop each time but nothing made the dialog box work.
    Any suggestions?

    Hi Mike, you have me at a loss.  I assume we've corresponded in the past.
    I'm sorry that I can't think of another thing to tweak in this case to see if you can get it to work.  I assume you've let it run a long time.
    Do you see any errors in your Windows System or Application Event Logs that might yield more info?
    -Noel

  • Printer does not show up in dialog box after being added

    I've done this a million times, but for some reason today after I add a printer it doesn't show up in my list in Print & Fax dialog of system prefs. It shows up when I try to print from all my applications, just not in my add/delete printer list. anyone know what is going on? I also have a co-worker with the same problem. He has added the same xerox printer 3 times, now in his print window there are 3 listed, but none show up in the add/delete printer window.

    Try this:
    1. Open System Preferences
    2. Click Print & Fax
    3. If you see your printer on the left then highlight it and then click the - at the bottom of the box to remove it.
    If you do not see it the progress to step 4.
    4. Click the + at the bottom of the box and the computer will begin looking for connected printers. Once found follow the onscreen instructions. If you cannot locate it then trouble shoot by ensuring the printer is turned on, has a good connection to the computer and if it's still not seen then replace the printer cable and try again.
    There probably isn't any reason to use the software that came with printer.
    Regards,
    Roger

  • Opening a file dialog box with a button while the data graph is running continuos aquisition

    I am running a continuous aquisition that is hardware timed. I display the data on a graph. While running the VI that is displaying the graph I want to open a file to write the data for a period of time then be able to select a new file after the file is written by hitting the open file button again. I also want to just have the file open and after it is opened hit another button that begins the writing to the file.

    To accomplish the first task use a control button, a case structure and a sub vi located inside the case structure. The control button determines the status of the case structure in response to user click. The sub vi writes your data into the file you specified in the file dialog. The entire process repeat itself each time the button is clicked. The set-up of the sub vi depends on organization and type of file you want. I think the second task is just a modification of the first.

  • Adding a Warning dialog box when submit button click

    Having troubles figuring out how to add a warning dialog when user click submit asking if he would like to proceed if a column field is null.

    Umm is it possible to do this with validation on submit and cancel the process mid way. if they hit cancel.
    Because data may be deleted in the database or change if i don't do it upon submit.
    E.G i kind of want to achieve something like this but i'm very unsure if it's even possible call a validation?
    boolean isValid
    isValid = call validation_name
    If isValid = false THEN
    javascript:if(confirm('Are you sure?')){doSubmit('P5_SUBMIT');}
    else
    javascript:doSubmit('P5_SUBMIT');
    END IF;Edited by: PandaOracle on Jan 24, 2012 10:19 AM

  • Laptop shuts down about 8 seconds after power button is pushed

     HP Pavilion dv9913cl Entertainment Notebook PC. what would cause the laptop to shut down after the initial page shows on the screen?

    Heating issues. For all the dv9000 series with nVidia video including your model there are well-known overheating and video/motherboard failure issues very well documented on the internet. Just google "HP dv9000 nvidia video problems". 

  • How to handle the button "cancel" in a dialog box for displaying views?

    Hello!
    I ve a question about handling the cancel button in a dialog box for displaying views.
    I ve already implemented the dialog box by using the following code:
    METHOD eh_onnewqact.
      DATA stitle TYPE string.
      IF m_popup IS BOUND.
        stitle = cl_bsp_runtime=>get_otr_text( alias = 'ZCC_ICRM/NEW_TASK' )."cl_wd_utilities=>get_otr_text_by_alias( 'ZCC_ICRM/NEW_TASK' ).
        m_popup = comp_controller->window_manager->create_popup(
          iv_interface_view_name = 'ZCC_POPUP_NEWBT/NewQActWindow'
          iv_usage_name = 'CUNewQAct'
          iv_title = stitle
        CALL METHOD m_popup->set_on_close_event
          EXPORTING
            iv_view       = me
            iv_event_name = 'NEWQACT_POPUP_CLOSED'.
      ENDIF.
      m_popup->open( ).
    ENDMETHOD.
    My dialog box consists two buttons - cancel and create.
    The cancel buttons should close the popup and the create button should create an entity of a specified object. but let us come to the cancel button. I did´nt find any information about implementing an cancel button. So, how should I implement it? I thougt
    me->close( ). But that didnt works!
    Could u give me further information about that, because my cancel event-handler is empty?
    method EH_ONCANCEL_QACT.
    endmethod.
    After that I would know how my calling view could know that the user pushes the Create Button and how the data of 2 inputfields of the dialog box finds their way to the calling view in order to process this data there?
    Thank you very much!

    Hi Michael,
    thank you for your advice! This problem is solved...
    ...but I have another issue. Ive implemented 2 editable fields in my popup. The user should fill that fields with context and that context should be processed in the calling view of my popup.
    My question is how to transfer these information from my popup to my calling view or method?
    I tried the following...
          lv_context_node ?= m_popup->get_context_node( 'QUICKACT' ).
          IF lv_context_node IS NOT INITIAL.
            lv_text = lv_context_node->get_date( attribute_path = '' ).
          ENDIF.
    But it doesnt work! The context node object is always empty/initial.
    Thank you!
    PS: Another possibility could be that the object / node of the calling view is transferred to the pop-up in order to process it there.
    Edited by: Marcus Findeisen on Feb 22, 2011 12:13 PM

Maybe you are looking for