ssjfulkon198 Posted February 12, 2007 Share Posted February 12, 2007 (edited) Probably a really simple asnwer...but how can i make a loop, like pressing B, but the delay time is specified by an input box? Also...how can i set a picture as the background? Here is something I tried with the loop thing... CODEWhile 1 Sleep (GUICtrlCreateInput("Insert Delay Value In Seconds...", 55, 120, 110, 20)) If $F7OnOff Then Send('b') Wend I dont think its right...since it doesn't work... but please help me! Edited February 12, 2007 by ssjfulkon198 Link to comment Share on other sites More sharing options...
BALA Posted February 12, 2007 Share Posted February 12, 2007 (edited) Have the input create separate, then get the value in it by using GUICtrlRead() Example: $input = GUICtrlCreateInput("Insert Delay Value In Seconds...", 55, 120, 110, 20) ; creates input While 1 $read = GUICtrlRead($input) ; reads value from input Send("b") ; sends "b" Sleep($read) ; sleeps amount of time(in milliseconds) specified in input WEnd What do you mean by the loop? EDIT: Did I get it right? Edited February 12, 2007 by BALA [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
ssjfulkon198 Posted February 12, 2007 Author Share Posted February 12, 2007 (edited) Umm.. I'm like really new at this stuff... WOW THANKS FOR FAST RESPONSE and you helped me ALOT! Edited February 12, 2007 by ssjfulkon198 Link to comment Share on other sites More sharing options...
Zedna Posted February 12, 2007 Share Posted February 12, 2007 (edited) Global $F7OnOff HotKeySet("{F7}", "ToggleF7") $delay = InputBox("Title","Insert Delay Value In Seconds...") $delay = $delay * 1000 While 1 Sleep ($delay) If $F7OnOff Then Send('b') Wend Func ToggleF7() $F7OnOff = NOT $F7OnOff EndFuncAdvice: For GUI applications use Koda. It will make AutoIt GUI code for you. Edited February 12, 2007 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
ssjfulkon198 Posted February 12, 2007 Author Share Posted February 12, 2007 Ehh...another thing... If I make a label...how can i change the font color its in? (I feel really stupid...(I program in Ruby and I just picked this up yesterday...)) Link to comment Share on other sites More sharing options...
Zedna Posted February 12, 2007 Share Posted February 12, 2007 Ehh...another thing... If I make a label...how can i change the font color its in? (I feel really stupid...(I program in Ruby and I just picked this up yesterday...))Run Koda and set-up what ever properties you want. Then Hit F10 and it will generate all GUI code gor you!! Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
BALA Posted February 12, 2007 Share Posted February 12, 2007 Run Koda and set-up what ever properties you want. Then Hit F10 and it will generate all GUI code gor you!!Try GUICtrlSetColorThough Koda is good an all, it's always a good idea to know how to do it without a machine [font="Comic Sans MS"]BA-LA[/font]http://ba-la.110mb.comJoin my community, CLICK HEREAlternative links to my site:http://www.ba-la.tkhttp://www.ba-la.co.nrContact me if you would like to help with some of my projects: joeythepirate@gmail.com Link to comment Share on other sites More sharing options...
toothyXdip Posted February 12, 2007 Share Posted February 12, 2007 is that right? $delay = GUICtrlCreateInput("Enter Amount In Sec.", 55, 120, 110, 20, GUICtrlSetColor(0, GUICtrlSetColor (0xFFFFFF)) (for me) ---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝'''║'''╝╝║'''║......║'''║'''║'''║'''''''''║'''''''''║'''║---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''╝''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝ Link to comment Share on other sites More sharing options...
Helge Posted February 12, 2007 Share Posted February 12, 2007 is that right?Ehm, not exactly. ; creates the control and stores the controlID in the $control-variable $control = GUICtrlCreateInput("Enter Amount In Sec.", 55, 120, 110, 20) ; use controlID to change the control's text-color to white GUICtrlSetColor($control, 0xFFFFFF) ; use controlID to change the control's back-color to black GUICtrlSetBkColor($control, 0x0) ;... ; read the control's current value and stores it in the $value-variable $value = GUICtrlRead($control) 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