Jump to content

Making buttons work with inputs.


 Share

Recommended Posts

Okay, so the script below opens a window with two input boxes and a button.

What I want to do (and have no idea how) is to make them interactable.

When I click the "submit" button, I want to save whatever is in the input boxes as a variable to be recalled by another script.

---------------SCRIPT---------------

#include <GUIConstants.au3>

$Test = GUICreate("Test", 241, 268, 397, 230)

$Input1 = GUICtrlCreateInput("Enter X Coords", 64, 72, 113, 21)

$Submit = GUICtrlCreateButton("Submit", 80, 144, 73, 25, 0)

$Label1 = GUICtrlCreateLabel("Coordinates to move mouse.", 48, 40, 138, 17)

$Input2 = GUICtrlCreateInput("Enter Y Coords", 64, 104, 113, 21)

$X = GUICtrlCreateLabel("X", 48, 72, 11, 17)

$Y = GUICtrlCreateLabel("Y", 48, 104, 11, 17)

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $Submit

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