Jump to content
Sign in to follow this  
AlmarM

MsgBox()

Recommended Posts

AlmarM

Hey

I have a question

I have:

Case $nMsg = $Button_2
MsgBox(4, "Clear", "Realy clear History?")
GUICtrlSetData($Edit_1, "", "")

What I want is that:

If user presses Yes the script will do the GUICtrlSetData()

If user presses No I want nothing to happen.

I think its easy to solve but I cant figure it out

-AlmarM-


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
weaponx

$result = MsgBox(4, "Clear", "Realy clear History?")

If $result = 1 Then

GUICtrlSetData($Edit_1, "", "")

EndIf

Share this post


Link to post
Share on other sites
AlmarM

Ty it was:

$Check_Yes_No = MsgBox(4, "Clear", "Realy clear History?")
If $Check_Yes_No = 6 Then
GUICtrlSetData($Edit_1, "", "")
EndIf

But thanks to u I found it :P

EDIT:

6 = Yes Button

7 = No Button

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
weaponx

Sorry, I was thinking OK / Cancel

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  

×