Sign in to follow this  
Followers 0
Guest Meflak

Another help thing..

3 posts in this topic

Ok A buddie showed me this code it works great for the question but I want to know can I set up a no or do I have to use else..?

func request_end()

$MB_YESNO = 4

$MB_YES = 6

if MsgBox($MB_YESNO, $title, "End script?") == $MB_YES then

Exit

endif

endfunc

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

I would do it like this...

Func Request_End()
   $MB = MsgBox(4 $Title, "End script?")
   If $MB = 6 Then
      Exit
   ElseIf $MB = 4 Then
    ;Do this if no is clicked.
   EndIf
EndFunc
Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Or

Func Request_End()
   If MsgBox(4, "Sure?", "Exit?") = 6 Then
      Exit
   Else
     ;Do whatever if no clicked
   EndIf
EndFunc  ;==>Request_End

FootbaG

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  
Followers 0