Greenyoda Posted September 2, 2006 Posted September 2, 2006 GuiCtrlCreateLabel("X", 10, 10) $xcoord = GuiCtrlCreateInput("246", 20, 5, 50 ) ; creates the input.GuiCtrlCreateUpDown(-1) ; sets the input as an up-down control.GuiCtrlCreateLabel("Y", 10, 40) $ycoord = GuiCtrlCreateInput("243", 20, 35, 50 ) ; creates the input.GuiCtrlCreateUpDown(-1) ; sets the input as an up-down control.GuiCtrlCreateLabel("X2", 5, 70) $x2coord = GuiCtrlCreateInput("215", 20, 65, 50 ) ; creates the input.GuiCtrlCreateUpDown(-1) ; sets the input as an up-down control.GuiCtrlCreateLabel("Y2", 5, 100) $y2coord = GuiCtrlCreateInput("231", 20, 95, 50 ) ; creates the input.GuiCtrlCreateUpDown(-1) ; sets the input as an up-down control.Will the variables $ycoord and such return the value thats inputed? Because it doesnt seem like its doing that:(
Valuater Posted September 2, 2006 Posted September 2, 2006 (edited) maybe expandcollapse popup#include <GUIConstants.au3> GUICreate("MY GUI") GuiCtrlCreateLabel("X", 10, 10) $xcoord = GuiCtrlCreateInput("246", 20, 5, 50 ) ; creates the input. GuiCtrlCreateUpDown(-1) ; sets the input as an up-down control. GuiCtrlCreateLabel("Y", 10, 40) $ycoord = GuiCtrlCreateInput("243", 20, 35, 50 ) ; creates the input. GuiCtrlCreateUpDown(-1) ; sets the input as an up-down control. GuiCtrlCreateLabel("X2", 5, 70) $x2coord = GuiCtrlCreateInput("215", 20, 65, 50 ) ; creates the input. GuiCtrlCreateUpDown(-1) ; sets the input as an up-down control. GuiCtrlCreateLabel("Y2", 5, 100) $y2coord = GuiCtrlCreateInput("231", 20, 95, 50 ) ; creates the input. GuiCtrlCreateUpDown(-1) ; sets the input as an up-down control. $button = GUICtrlCreateButton( " chek values ", 100, 300, 120, 30) GUISetState() While 1 $msg = GUIGetMsg() if $msg = $GUI_EVENT_CLOSE Then Exit If $msg = $button Then $x = GUICtrlRead($xcoord) $y = GUICtrlRead($ycoord) $x2 = GUICtrlRead($x2coord) $y2 = GUICtrlRead($y2coord) MsgBox(64, "Value x", "x = " & $x) EndIf WEnd 8) Edited September 2, 2006 by Valuater
Helge Posted September 2, 2006 Posted September 2, 2006 (edited) Boot up your helpfile and look up any GUICtrlCreat*-function. You will see that they return something called a controlID. $ycoord will not return the value inputted in the control but instead it will return these IDs mentioned which can be used to read, write, delete, hide, modify and more using other functions mentioned in the helpfile. So, to read the value of your inputbox, just look at the first line in the remarks-section for GUICtrlCreateInput where the answer will be waiting for you. I know I could just say it to you but that's so boring Edit : A little bit late but I just noticed...why is this in the v2-forum ? Edited September 4, 2006 by Helge
Vicks Posted September 5, 2006 Posted September 5, 2006 seeing how your new also might want to think about using autoit beta [s]Autoit[/s]
Debaser Posted September 5, 2006 Posted September 5, 2006 hey guys... sorry but how can set a picture in my profile?
Recommended Posts