Jump to content

Recommended Posts

Posted

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

  • Moderators
Posted

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.

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.

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...