Jump to content

Recommended Posts

Posted

I want to have 3 buttons on a GUI that can be clicked 3 times. When one is clicked 3 times it should disappear. Can someone help me with this? (Also I want to be able to click the buttons in any order.)

  • Developers
Posted (edited)

I want to have 3 buttons on a GUI that can be clicked 3 times. When one is clicked 3 times it should disappear. Can someone help me with this? (Also I want to be able to click the buttons in any order.)

help means to me that you post the stuff you have and others chime in .... Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

Global $Count1 = 0
Global $Count2 = 0
Global $Count3 = 0
While 1
    If $Count1 = 3 Then
        GUICtrlSetState($button1, $GUI_HIDE)
    If $Count2 = 3 Then
        GUICtrlSetState($button2, $GUI_HIDE)
    If $Count3 = 3 Then
        GUICtrlSetState($button3, $GUI_HIDE)
    $msg = GUIGetMsg()
    Select
    Case $msg = $button1
        $Count1 = $Count1 + 1
    Case $msg = $button2
        $Count2 = $Count2 + 1
    Case $msg = $button3
        $Count3 = $Count3 + 1
    EndSelect
WEnd

UNTESTED

Hopefully it works and hopefully it helped :whistle:

Kurt

Edited by _Kurt

Awaiting Diablo III..

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
×
×
  • Create New...