bool confirm(string s) {print "Confirmed: " s "\n"; return true} void ack(string s) {print "Ack: " s "\n"} void errorBox(string s) {print "Error: " s "\n"} void warningBox(string s) {print "Warning: " s "\n"} void acknowledge(string s) {print "Acknowledge: " s "\n"} void infobox(string s) {print "InfoBox: " s "\n"} void info(string s) {print "Info: " s "\n"} DB tmpDB=null DBE tm=null // Notice that show will only store the variable now. void oldshow(DB x){show x} void show(DB x){tmpDB=x} #include // create the dialog but do not show it yet showRPEExportDialog(LS_("String_Export_To_Word", NLSTEMP_("Export to Word")), (NLS_("doc")), (NLS_(".doc"))) // add a timer to it, it will 'press' the button now after we do show ... void newcb(DBE x){ print "Calling timercallback ...\n"; stopTimer tm; exportCB(null) } tm = timer(tmpDB, 0.2, newcb,"") // realize the dialog box, so we can apply the settings .... realize tmpDB; // apply the settings set(includeEmptyAttrsToggle,false) set(viewNameToggle,false) set(includeTablesToggle,false) set(exportFileName,"C:\\...") set(templateFile,"C:\\...") //set(styleChoice,0) // show the dialog, timer will kick in and press our button print "About to enter message loop ...\n"; oldshow tmpDB