stev379 Posted November 23, 2005 Share Posted November 23, 2005 (edited) How can I have a label print one charactor to a GUI window, then loop around and print again, but one charactor to the right? It's obvious this won't work, so I thought I'd check for any ideas... Thanks! EXAMPLE: _Rows() Func _Rows() $i = 0 Do $01 = Random(0, 15, 1) $Label_01 = GUICtrlCreateLabel($01, $i, 0, 400,400);61 charactors Sleep (100) Until $i = 400 EndFunc Edited November 23, 2005 by stev379 Link to comment Share on other sites More sharing options...
w0uter Posted November 23, 2005 Share Posted November 23, 2005 you dont increase $i use a for loop. 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...
stev379 Posted November 23, 2005 Author Share Posted November 23, 2005 (edited) Yeah, I just realized that. This is the newer code and it does what I want but it blanks out the previous label. I'd like it to go sort of like: 12345 Not (All of below would be on the same line, it's just that the preceding number gets blanked) 1 _ 2 __ 3 ___ 4 ____ 5 EDIT: I got it...had to increase the $i variable by the width of a character Func _Rows() $i = 0 Do $01 = Random(0, 15, 1) $Label_01 = GUICtrlCreateLabel($01, $i, 0, 12,15) Sleep (100) $i = $i + 12 ;Prior to EDIT this was $i = $i + 1 Until $i = @DesktopWidth EndFunc;_Rows() Edited November 23, 2005 by stev379 Link to comment Share on other sites More sharing options...
Developers Jos Posted November 23, 2005 Developers Share Posted November 23, 2005 You dont want to create a LABEL everytime, but once and then update the LABEL with GUICtrlSetData(). SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
stev379 Posted November 23, 2005 Author Share Posted November 23, 2005 That figures...lol I just figured out how to do it my way. Now I need to go back and do it the correct way. Link to comment Share on other sites More sharing options...
w0uter Posted November 23, 2005 Share Posted November 23, 2005 #include <GuiConstants.au3> Func _Rows() For $i = 0 to @DesktopWidth step 12 GUICtrlCreateLabel(Random(0, 15, 1), $i, 0, 12,15) Next EndFunc;_Rows() GuiCreate("How is This ?", @DesktopWidth, 15, 0, 0) _Rows() GuiSetState() While 1 Switch GuiGetMsg() Case $GUI_EVENT_CLOSE ExitLoop Case Else ;;; EndSwitch WEnd 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...
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