Sign in to follow this  
Followers 0
racerrunner

OnCLICK EVENT? Thank You

3 posts in this topic

Hi all,

I create 3 buttons as shown. I.E if i click on the "Adding" Button, i want the prg to perform certain thing.

Therefore, how do i know which button is clicked? Is there such thing as Button_onclick event?

GUICreate("Testing", 200, 200)

GuiCtrlCreateButton("Adding", 50, 20, 100, 30)

GuiCtrlCreateButton("Removing", 50, 60, 100, 30)

GuiCtrlCreateButton("Exit", 50, 100, 100, 30)

GUISetState()

While 1

$msg = GUIGetMsg()

If $msg = $GUI_EVENT_CLOSE Then ExitLoop

Wend

Thank You

Share this post


Link to post
Share on other sites



Download the Beta (you'll need it anyway, you can see the link to it at the top of this forum) Then look at the Beta Help, there is an example of how to use it with GUICtrlCreateButton()... It shows making the control a variable, and using $msg = variable name.


[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

Thank You SmOke_N for replying my 2 posts.

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