Sign in to follow this  
Followers 0
MasonMill

assigning variables with GUI

3 posts in this topic

Hey everyone, if i make some GUI like below. Whats the best way of assigning a variable a certain quantity in the given field? Thanks?

#include <GUIConstantsEx.au3>

$someVariable = "1"

GUICreate("a GUI", 200, 100)
GUICtrlCreateLabel("This GUI", 20, 10)
GUISetState(@SW_SHOW)

GUICtrlCreateLabel("a variable", 20, 50)
$Input1 = GUICtrlCreateInput($someVariable, 80, 50, 80, 20)

While 1
    Sleep(1000)
WEnd

Share this post


Link to post
Share on other sites



Look at GUICtrlRead in the help file. Before you'd need to use the input you'd use GUICtrlRead on it and do any error checking (type, size, expected, etc) and then use it.

$sInput = GUICtrlRead($Input1)

Share this post


Link to post
Share on other sites

Look at GUICtrlRead in the help file. Before you'd need to use the input you'd use GUICtrlRead on it and do any error checking (type, size, expected, etc) and then use it.

$sInput = GUICtrlRead($Input1)

cool, ill go check that out. thanks!

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  
Followers 0