I am in a situation where I need to display a message box(with Pass, Fail buttons) while script running and based on whether user click the pass button or fail button, I need to Log result in result file. Is there any dll which I can use. can some one help me.
Check out DisplayMessage() in the help. It may not be EXACTLY what you are looking for. Silk will pop up a OK/Cancel messagebox that you will need to dismiss manually. If you hit cancel, the script aborts. If you want more specific behavior, you could write a simple dll in C++. You may need to define a custom messagebox where you add "Pass" and "Fail" buttons and some code to be executed when either is pressed.
Silk has declared the WinAPI function MessageBox() in mswfun32.inc. This function takes 2 additional parameters compared to DisplayMessage(), a handle to a parent (set it to 0) and a style (e.g. MB_OK). The styles are defined in mswconst.inc. The MessageBox() function will return an integer that indicates which button was pressed (these are not defined anywhere, experiment a bit). You can then write some code that depends on that return value. The good thing here is that your script won't abort if you hit cancel, you determine what the script does, not Segue. You also have the added flexibilty of determining the style of the message box, OK/Cancel, Yes/No etc.. It's very strange that Silk's DisplayMessage() function is so rigid considering that they are really calling this MessageBox() function on the underneath.
[This message has been edited by BrianCarroll (edited 12-16-2000).]
Thanks to BrianCarroll's excellent response I was able to cobble up a very simple example. If you simply do a use for "msw32.inc" you get most of the windows dll functionality .. (big timesaver).
I did this because I have seen this topic far too many times here and I wanted to see a definate solution. Again real nice find on BrianCarroll's part .. I think I will have to remember this person .. seems to be very good with DLL's!!!
[This message has been edited by rick_weth (edited 12-17-2000).]