TSequencer.MessageBoxModeless
Previous  Top  Next

MessageBoxModeless(strText, [wButtons], [wIcon=MB_ICONEXCLAMATION])

Displays a modeless message box. This function behaves identical to MessageBox(), except that the dialog is shown in a modeless fashion which lets you interact with the rest of GSEOS. The text strText is displayed as the message prompt. The standard windows buttons can be specified with the wButtons parameter. If the user choses Cancel the function raises a TSeqAbortError exception.

If you want your sequencer to continue running even if the user presses Cancel you have to handle the TSeqAbortError exception.


ParameterDescription     
strTextThe message prompt text..     
wButtons Optional, specifies the buttons to display. One of the following attributes can be specified: MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL.      
wIcon Optional, specifies an icon to display. MB_ICONEXCLAMATION, MB_ICONINFORMATION, MB_ICONQUESTION, MB_ICONSTOP.     
 
Returns
One of the following constants depending on the user action: IDNO, IDOK, IDRETRY, IDYES.

Example
Display a message box that prompts the user to confirm a parameter and continue with the sequence:

def fMySeq(oSeq):
  oSeq.Wait([HK], fSetHV)
  oSeq.MessageBoxModeless('Please make sure the HV value is in the range 1 .. 4!, MB_OKCANCEL)