Is there an alternative to the SilkTest DisplayMessage() method, which will not halt script execution?
The DisplayMessage() method displays a message box and halts script execution until the user manually dismisses the message box. This method allows the user to specify their own caption and message, along with "OK" and "Cancel" pushbuttons. Script execution pauses until one of the pushbuttons is manually clicked. If the user clicks "OK", execution resumes. Clicking "Cancel" is equivalent to aborting script execution.
However, the following code will produce a similar messagebox, but will also continue the execution of the script, providing a useful alternative to the DisplayMessage() method.
[ ] // DLL call to produce a message box, used as an alternative to DisplayMessage() method in 4Test. [ ] [ ] use "mswconst.inc" [ ] [-] dll "user32.dll" [ ] [ ] long MessageBox (long hwnd, string lpText , string lpCaption, long wType) alias "MessageBoxA" [ ] [ ] [-] testcase Test1() appstate none [ ] [ ] [ ] Print (MessageBox(Desktop.GetHandle(),"Message to be displayed","MessageBox Title",MB_OKCANCEL)) [ ]