Mailtraq - the Complete Email Server
   

Enstar for Mailtraq email server sales & support
Making world-class Internet technology affordable  

Search for:

Advanced search

MessageDlg()

Places a dialog box centre-screen of the machine on which Mailtraq is running. Script execution is halted until the user responds to or dismisses the dialog. This function is useful in scripts for obtaining user responses and for monitoring start and end times, the state of variables, etc.

result := MessageDlg( text [ , title [ , buttons ] ] )

text
Quoted text, "This is quoted text", or any expression which evaluates to a displayable string
title
Optional window title where "C"=Confirm, "E"=Error, "W"=Warning and "I"=Information (the default)
buttons
Optional dialog buttons, "OK", Yes", "No" and "Cancel" in a single string (see example). Default is "OK"
result
The string on the selected button face or "Cancel" if the user dismisses the dialog
// Shows dialog boxes for user response, for variable state and for time taken
i := 1;
begin_time := DateTimeToReal(FormatDateTime("dd/mm/yyyy hh:nn:ss"));
run := MessageDlg("Do you wish to see the variable example?", "C", "Yes, No, Cancel");
MessageDlg("You clicked on " ++ run ++ "", "C", "Yes");
If(run = "Yes",
  While(i <= 5,
    Do(
      MessageDlg("This is loop iteration " ++ i),
      i := i + 1
    )
  )
);
end_time := DateTimeToReal(FormatDateTime("dd/mm/yyyy hh:nn:ss"));
msg := "That took " ++ LJ(((end_time - begin_time) * 24 * 60 * 60), 4) ++ " seconds";
MessageDlg(msg ++ "", "W", "Cancel")
Mailtraq Highlights...
 SMTP Server     Mailtraq SMTP email server video IMAP Server     Mailtraq IMAP email Server video
 POP3 Server     Mailtraq POP3 email server video Proxy Server     Mailtraq proxy email server video
 Webmail Server     Mailtraq webmail email server video Mailing-list Server     Mailing list email server video
 Groupware Services     Mailtraq groupware email services video Spam and Virus control     Spam and virus control email server video

 

   Copyright © 2003 - 2011 Enstar Ltd, Enstar LLC & Fastraq Ltd. All rights reserved. Privacy policy.
   Mailtraq® is a registered trademark of Fastraq Limited.