How to skip dialog box on html export from module

Hi,

   Currently working on DXL script to export the module in the html format ,I am using the DOORs menu to export the html file , I would like to have automated solution to export in html without using the menu function

 

Here is the script I am working on, I just need to run with out selecting the menu-pop up.

 

#include <utils/libhtml.dxl>

pragma runLim,0

Trigger htmlTrigger


/*******************************************************************************
 * htmlExportCB
 *
 */

void htmlExportCB(DB db) {
    do_export_file db
    delete htmlTrigger
}


/*******************************************************************************
 * htmlCloseCB
 *
 */

void htmlCloseCB(DB db) {
    delete htmlTrigger
    hide htmlBox
}


/*******************************************************************************
 * htmlHelpCB
 *
 */

void htmlHelpCB(DB db) {
    helpOnEx(htmlBox, DOORSHelp, helpExportHTML)
}

/*******************************************************************************
 * htmlCloseModuleTrig
 *
 */

bool htmlCloseModuleTrig(Trigger t) {
    hide htmlBox
    return true
}


/************************************************************************/
void create_html_dialog () {
    string file_name

    htmlBox = centered "Export HTML"

    htmlTrigger = trigger(module, close, 10, htmlCloseModuleTrig)

    formatChoice = choice(htmlBox, "Layout:",exportFormats,exportAsTable)
    set(formatChoice, exportTypeChanged)
    sourceChoice = choice(htmlBox, "Export:",exportSources,exportAsBook)
    set(sourceChoice, sourceTypeChanged)
    frmInclude = frame(htmlBox, "Include:", 100, 50)
    frmInclude->"left"->"form"
    frmInclude->"right"->"form"
    frmInclude->"top"->"spaced"->sourceChoice
    frmInclude->"bottom"->"unattached"
    linksToggle = toggle(htmlBox, "Links", true) 
    linksToggle->"left"->"inside"->frmInclude
    linksToggle->"top"->"inside"->frmInclude
    linksToggle->"bottom"->"inside"->frmInclude
    linksToggle->"right"->"unattached"
    iconsToggle = toggle(htmlBox, "Icons", false)
    iconsToggle->"left"->"spaced"->linksToggle
    iconsToggle->"top"->"inside"->frmInclude
    iconsToggle->"bottom"->"inside"->frmInclude
    iconsToggle->"right"->"unattached"
    cmToggle = toggle(htmlBox,"Change meter",false)
    cmToggle->"left"->"spaced"->iconsToggle
    cmToggle->"top"->"inside"->frmInclude
    cmToggle->"bottom"->"inside"->frmInclude
    cmToggle->"right"->"unattached"
    set(cmToggle, changeMeterSelectedCB)
    emptyAttributeToggle = toggle(htmlBox, "Empty attributes", true)
    emptyAttributeToggle->"left"->"spaced"->cmToggle
    emptyAttributeToggle->"top"->"inside"->frmInclude
    emptyAttributeToggle->"bottom"->"inside"->frmInclude
    emptyAttributeToggle->"right"->"unattached"
   file_name = (("c:\\myhtmlfiles" "") FileSep_ goodFileName(name expMod) ((platform == "WIN32") ? ".htm" : ".html"))
    db_filename = fileName(htmlBox, file_name, "*.HTM", "HTML files", false)
    db_filename->"top"->"spaced"->frmInclude
    preserveColumnAutoIndentingToggle = toggle(htmlBox,//-
                               "Preserve auto-indentation",autoIndent(current))
    ok(htmlBox, "Export", htmlExportCB)
    apply(htmlBox, "Help", htmlHelpCB)
    close(htmlBox, true, htmlCloseCB)
}


/************************************************************************/


// check status
if ((current Module) != null)
{
    // check status
    if ((current Object) != null)
    {
        create_html_dialog
        show htmlBox
    }
    else
    {
        ack "There are no objects in the current view."
    }
}
else
{
    ack "There is no current module to export."
}

 

 


RamPalappalayam - Mon Oct 19 09:48:40 EDT 2015

Re: How to skip dialog box on html export from module
RamPalappalayam - Wed Oct 21 10:26:56 EDT 2015

found the solution:

 

   create_html_dialog
        realize htmlBox                             //which continues the script execution in the palace of show
        htmlExportCB htmlBox           /call the function that is in the ok setup