I'm trying to write a piece of code that has a GUI window with a text entry box and a slider. The text entry box changes what text is returned, and the slider changes the size of the text. However, when I run this code, the Gui, Submit code doesn't work - all of the variables that the documentation says should be updated aren't, and remain empty.
Code: Select all
!m::
Gui, Add, Text,, Please enter your text:
Gui, Add, Edit, r2 vmytext w135
Gui, Add, Slider, vmyslider gUpdateSize, 25
Gui, Add, Text, vtextsize, Text Size
Gui, Add, Button, Default w80 gSubmit, OK
Gui, +AlwaysOnTop +Owner
Gui, Show
Return
UpdateSize() {
Gui +LastFound
Gui, Submit, nohide
MsgBox, %myslider%
Gui, Font, s%myslider%
GuiControl, Font, textsize
}
Submit() {
SendLevel 1
Completed := True
Gui, Submit, nohide
Gui, Destroy
MsgBox, %mytext%
BounceText(mytext,myslider)
}