Jump to content
Sign in to follow this  
realkiller

simple question

Recommended Posts

Helge

Look at the return-values of MsgBox in the helpfile.

Use If/EndIf to check the returned value and make it perform actions correspondingly.

Share this post


Link to post
Share on other sites
MHz

Seems strange at your 112 post count but here goes....

$result = MsgBox(4, "Question", "Yes or No")

If $result = 6 Then
    MsgBox(0, $result, 'You pressed Yes')
ElseIf $result = 7 Then
    MsgBox(0, $result, 'You pressed No')
EndIf

Does that help you? ;)

Edit:

Hold on. Flag 4 is Yes/No :lmao:

Edit: corrected code.

Edited by MHz

Share this post


Link to post
Share on other sites
xcal

I had prepared this for a response and don't want it to go to waste. ;)

Do
    $question = MsgBox(4, 'Question', 'Should you study the help file a little harder?')
    If $question = 6 Then
        MsgBox(0, 'Correct', 'You''ve answered correctly.')
    Else
        MsgBox(0, 'Wrong', 'Wrong answer, try again!')
    EndIf
Until $question = 6

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×