The_Noob 0 Posted December 1, 2006 expandcollapse popup#include <GUIConstants.au3> Global $Paused = 0 $Input1 = "" $Input2 = "" Opt("sendkeydelay", 0) ;1=absolute, 0=relative, 2=client #include <GUIConstants.au3> #Region ### START Koda GUI section ### Form= $Form1 = GUICreate("AForm1", 234, 98, 193, 115) $Input1 = GUICtrlCreateInput("", 8, 8, 49, 21) $Input2 = GUICtrlCreateInput("", 64, 8, 49, 21) $Button1 = GUICtrlCreateButton("AButton1", 120, 8, 49, 25, 0) $Button2 = GUICtrlCreateButton("AButton2", 176, 8, 49, 25, 0) $Input3 = GUICtrlCreateInput("AInput3", 184, 40, 41, 21) $Input4 = GUICtrlCreateInput("AInput4", 184, 64, 41, 21) $Label1 = GUICtrlCreateLabel("SendKeyDelay-------------------------------", 8, 40, 167, 17) $Label2 = GUICtrlCreateLabel("SendKeyDownDelay----------------------", 8, 64, 168, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() opt("SendKeyDelay", $input3) opt("SendKeyDownDelay", $input4) tooltip($input1 & " " & $input2) if $nMsg = $GUI_EVENT_CLOSE then Exit EndIf if $nMsg = $Button1 Then Do $nMsg = GUIGetMsg() send($input1) send($input2) until $nMsg = $Button2 EndIf WEnd If you run this, you notice it returns 3 and 4 for $input1 and $input2... why? what did i forget? Share this post Link to post Share on other sites
Thatsgreat2345 0 Posted December 1, 2006 take a look at GuiCtrlRead() Share this post Link to post Share on other sites
Helge 3 Posted December 1, 2006 (edited) Look in the helpfile for what's mentioned under "Return value" on the GUICtrlCreateInput-page. There it says that what's return is something called controlID (and not the control's value), which you can use when you need to work with the control. $input = GUICtrlCreateInput("text", 10, 10, 200, 20); $input equals input's controlID $value = GUICtrlRead($input) ; read the control and write it to the $value-variable GUICtrlSetColor($input, 0xFF0000) ; changes the input's font-color to red Edited December 1, 2006 by Helge Share this post Link to post Share on other sites
MHz 76 Posted December 1, 2006 Opt("sendkeydelay", 0) ;1=absolute, 0=relative, 2=clientHmm...that comment does not reflect with the Opt() It is not derived by Scite abbreviations. ;~ Opt('SendKeyDelay', 5) ; ? = 5 milliseconds by default. Share this post Link to post Share on other sites
The_Noob 0 Posted December 4, 2006 Hmm...that comment does not reflect with the Opt() It is not derived by Scite abbreviations. ;~ Opt('SendKeyDelay', 5) ; ? = 5 milliseconds by default. lol ya im a copy/paster. i had copied a winmove or somthing of the like, and that comment was on it. I leave comments for myself, and quite often they dont make sense to anyone but me. Either way, it doesnt effect the workings of the script. thanks Thatsgreat2345 that helped me figure it out Share this post Link to post Share on other sites