Jump to content
Sign in to follow this  
SniperSA

Change GUI Input Data

Recommended Posts

SniperSA

#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?

Share this post


Link to post
Share on other sites
James

#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

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.