hmRaggy Posted December 21, 2005 Share Posted December 21, 2005 Hello, I am trying to make a GUI window with an input box so that I can take whatever is in that input box and paste it in a spot in a script... don't know if that makes any sense or not, but heres the way I'm thinkin' of it Here is my script so far... #include <GUIConstants.au3> GUICreate("Double Click", 120, 40, 20, 20) GUISetState (@SW_SHOW) $var = GUICtrlCreateInput("120", 10, 10, 100, 20) HotKeySet("{1}", "one") Func one() Send("1") Sleep($var) Send("2") EndFunc While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend I just need an universal example so I can make what I need =p Link to comment Share on other sites More sharing options...
w0uter Posted December 21, 2005 Share Posted December 21, 2005 (edited) what is wrong with inputbox() but i dont think that is what you are after, read up on guictrlread. Edited December 21, 2005 by w0uter My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
hmRaggy Posted December 21, 2005 Author Share Posted December 21, 2005 I'm just trying to do somethin' like a copy/paste. Like I wanna run a script, and whatever is in the input box will be inputed inside the script. Like if I wanted my script to press "1" (sleep) "2" whenever I press a hotkey but I wnated to adjust the sleep time between "1" (slep) "2" with the gui input. So I could run the script and be able to change the sleep variable without configuring the script itself. Link to comment Share on other sites More sharing options...
w0uter Posted December 21, 2005 Share Posted December 21, 2005 Sleep($var) should be like Sleep(int(GuictrlRead($var))) My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
Valuater Posted December 21, 2005 Share Posted December 21, 2005 maybe this expandcollapse popup; Press Esc to terminate script #include <GUIConstants.au3> Dim $var = 100 Dim $go = "stop" Dim $Paused HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "Set_Sleep") HotKeySet("{PAUSE}", "TogglePause") TogglePause() ;;;; Body of program would go here;;;; While 1 Sleep($var) Send("1") Sleep($var) Send("2") WEnd ;;;;;;;; Func Terminate() Exit 0 EndFunc Func Set_Sleep() $var = InputBox("Set Sleep", "Please type in the sleep time desired") MsgBox(64, "Sleep Setting", "Sleep has been set to " & $var & " milliseconds ", 3) EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc 8) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now