Jump to content
Sign in to follow this  
Ultratech

Anyway To Do This?

Recommended Posts

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.)

Share this post


Link to post
Share on other sites

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 Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

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

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  

×
×
  • Create New...