Jump to content

Change GUI Input Data


Recommended Posts

#include <GUIConstants.au3>

GUICreate("CPT-GUI", 80, 85)
$a1 = GUICtrlCreateInput("Test", 0, 0, 79, 20)
$2 = GUICtrlCreateButton("Test",0,20)
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    $1 = GUICtrlRead($a1)
    Select
        Case $msg = $2
            $1 = "Worked
            
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

What I want the code to do is when $2 is pressed to set the input ($a1) from "Test" to "Worked", that test code didn't work, what would?

Link to comment
Share on other sites

#include <GUIConstants.au3>

GUICreate("CPT-GUI", 80, 85)
$a1 = GUICtrlCreateInput("Test", 0, 0, 79, 20)
$2 = GUICtrlCreateButton("Test",0,20)
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Switch $msg
        Case $2
            GuiCtrlSetData($a1, "Worked", "")
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Link to comment
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
 Share

  • Recently Browsing   0 members

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