toothyXdip Posted November 9, 2007 Share Posted November 9, 2007 Is there a way to make it where there is a constant loop of color change for a label without a ton of "If's" and does without the help of a button send ---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝'''║'''╝╝║'''║......║'''║'''║'''║'''''''''║'''''''''║'''║---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''╝''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝ Link to comment Share on other sites More sharing options...
Valuater Posted November 9, 2007 Share Posted November 9, 2007 Maybe... AdLib() #include <GUIConstants.au3> Dim $num $Form = GUICreate("Demo") $label = GUICtrlCreateLabel("Color changing text", 50, 150, 200, 20) GUISetState(@SW_SHOW, $Form) AdlibEnable("Color_Change", 500) While 1 $msg = GUIGetMsg() If $msg = -3 Then Exit WEnd Func Color_Change() $num += 1 $color = StringSplit("0xfffafa,0xdcdcdc,0x000080,0xcd5c5c", ",") If $num > $color[0] Then $num = 1 Return GUICtrlSetColor($label, $color[$num]) EndFunc 8) Link to comment Share on other sites More sharing options...
toothyXdip Posted November 9, 2007 Author Share Posted November 9, 2007 (edited) thanks =) yeah i dont really know how to use arrays or a lot of the functions yet so that might have helped lol thanks again P.S. i have a question about what is happening in this script ok so tell me where im wrong the AdlibEnable is telling to evaluate the function colorchange every 500 milliseconds making it loop the colorchange then is the $num +=1 telling it how fast to do the color changes in the StringSplit? and the return is telling it what to make out of all of that and that is to change the color accordingly to the array returned from the StringSplit function? 0.o Edited November 9, 2007 by toothyXdip ---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝'''║'''╝╝║'''║......║'''║'''║'''║'''''''''║'''''''''║'''║---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''╝''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝ Link to comment Share on other sites More sharing options...
Valuater Posted November 9, 2007 Share Posted November 9, 2007 (edited) the AdlibEnable is telling to evaluate the function colorchange every 500 milliseconds making it loop the colorchangeYesthen is the $num +=1 telling it how fast to do the color changes in the StringSplit?Actually, the $num is telling which color to use next #1 through #5and the return is telling it what to make out of all of that and that is to change the color accordingly to the array returned from the StringSplit function?Yes, and if there is any error that will be sent too. 8) Edited November 9, 2007 by Valuater Link to comment Share on other sites More sharing options...
toothyXdip Posted November 10, 2007 Author Share Posted November 10, 2007 thanks yeah i think im going to look up a array tut or read the whole array help files lol well thanks again this and reading some of your other scrips has helped me to learn alot ---╔╦═╗╔╗'''╔╗╔═╦═╗╔╦═╗---╝╠═╣╝║'''║╝╝'''║'''╝╝║'''║......║'''║'''║'''║'''''''''║'''''''''║'''║---╔╩═╩═╩═╩═══╩═╦═╩═╩══╦══════╗''''╔╩════════════╩══╗╔══╩══╗╔══╝ ''''╝''''''''''''''''''''''''''''''''''''''''''''''''║║'''''''''''''''║║ ''''''''''''''''''''''''''''''''''''''''''''''╔══╝╚══╗''''''║║''''''''''''''''''''''''''''''''''''''''''''''╚══════╝''''''╚╝ Link to comment Share on other sites More sharing options...
therks Posted November 12, 2007 Share Posted November 12, 2007 and the return is telling it what to make out of all of that and that is to change the color accordingly to the array returned from the StringSplit function?Yes, and if there is any error that will be sent too.???How does that work? A return in an Adlib function doesn't do anything does it? Where is it returning the value to?? My AutoIt Stuff | My Github 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