SPONSORS:






User Tag List

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Dec 2000
    Location
    hillsboro,or,usa
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    User defined MessageBox to pause the script

    Hi,
    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.

    Thanks in Advance,

    Murali Krishna
    pmk

  2. #2
    Senior Member
    Join Date
    Oct 1999
    Location
    Tyngsborough, MA
    Posts
    211
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: User defined MessageBox to pause the script

    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.

    New thought...
    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).]

  3. #3
    Senior Member
    Join Date
    Sep 1999
    Location
    San Jose,CA,USA
    Posts
    340
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: User defined MessageBox to pause the script

    muralikrishna

    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).]
    Smoke me a kipper, I'll be back for breakfast!
    Sincerely
    Richard Weth
    Sr. QA Engineer

  4. #4
    Junior Member
    Join Date
    Dec 2000
    Location
    hillsboro,or,usa
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: User defined MessageBox to pause the script

    Thanks to Brian and Rick. This worked for me.

    Murali Krishna

    pmk

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 02:34 AM.

Copyright BetaSoft Inc.