Results 1 to 2 of 2
  1. #1
    samir500's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    2
    My Mood
    Happy

    Problem with enable and disable buttons

    Hello everyone,

    i have a problem with my code. I want to start notepad and then disable the button and when the windows close it must enable the button again.
    But with my code now, i need to click 2 times and then it disable it, en when i close the 2 notepad windows it enables the button again. See code.

    Code:
    #RequireAdmin
    
    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <WindowsConstants.au3>
    #Region ### START Koda GUI section ### Form=
    Global $Form1 = GUICreate("Form1", 615, 437, 557, 174)
    Global $Button1 = GUICtrlCreateButton("Button1", 88, 56, 75, 25)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###
    
    
    While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
            Case $Button1
                Run("notepad.exe")
                GUICtrlSetState($Button1, $GUI_DISABLE)
                WinWaitClose("[CLASS:Notepad]")
                GUICtrlSetState($Button1, $GUI_ENABLE)
    
        EndSwitch
    
    WEnd

  2. #2
    samir500's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Posts
    16
    Reputation
    10
    Thanks
    2
    My Mood
    Happy
    I have solved the problem, i don't need anymore help.

Similar Threads

  1. Problems with alterIWnet and basic hax 3.1.0
    By Psychros in forum Call of Duty Modern Warfare 2 Help
    Replies: 8
    Last Post: 07-16-2010, 07:47 AM
  2. [Help] Problem with wallhack and my Golden AK
    By Wyo in forum CrossFire Hacks & Cheats
    Replies: 14
    Last Post: 02-28-2010, 09:10 AM
  3. [Help] Problem with FRAPS and HYPERCAM
    By BUSTER123 in forum CrossFire Hacks & Cheats
    Replies: 7
    Last Post: 12-23-2009, 10:13 AM
  4. Problem With Xfire and Warrock
    By lagginswag in forum General Hacking
    Replies: 1
    Last Post: 09-12-2009, 12:22 PM
  5. Solve Problems with Vista and hacks
    By knappy in forum Combat Arms Hacks & Cheats
    Replies: 5
    Last Post: 08-11-2008, 06:26 PM