Message Box

Top  Previous  Next

MessageBox function presents the user with a message box and stops processing of the test.

 

Syntax

 

returnValue = MessageBox( message, [Button Options], [Icon and Sound] )

 

Parameters

message

 

String message to display

type1

 

Optional decimal number from the type1 list

type2

 

Optional decimal number from the type2 list

return value

 

Decimal number from the return value list

 

 

 

 

Examples

 

result = MessageBox( "Is it OK to process data for " + instrument.date, 3, 32 )
 
 IF result = 7 THEN
         test.AbortSimulation( "Your Finished!" )
 ELSE
         PRINT "Processing trades for ", instrument.symbol, " on ", instrument.date
 ENDIF

 

 

 

Button Options List:

0 -- OK

1 -- OK/Cancel

2 -- Abort/Retry/Ignore

3 -- Yes/No/Cancel

4 -- Yes/No

5 -- Retry/Cancel

6 -- Cancel/Try Again/Continue

 

Icon and Sound List:

16 -- Icon X, Windows Critical Stop Sound

32 -- Icon Question, Windows Ding Sound

48 -- Icon Exclamation, Windows Exclamation Sound

64 -- Icon Information, Windows Error Sound

 

Button Return Value List:

1 -- OK

2 -- Cancel

3 -- Abort

4 -- Retry

5 -- Ignore

6 -- Yes

7 -- No

10 -- Try Again

11 -- Continue

 

MessageBoxIcons