walle Posted February 14, 2008 Posted February 14, 2008 (edited) Looking for a better way of doing this, instead of adding string by string, like with the top10 array. Func TOP10() _GUICtrlListBox_ResetContent($LISTBOX1) $SOURCE = _INETGETSOURCE("http://www.swedvdr.org/browse.php?sort=7&type=desc") $Top10 = _StringBetween($SOURCE,"'><b>","</b></font></a><br>") For $I = 0 To $Top10 [0] Next _GUICtrlListBox_AddString($LISTBOX1, "________TOP10_______") _GUICtrlListBox_AddString($LISTBOX1, $Top10 [0]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [1]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [2]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [3]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [4]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [5]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [6]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [7]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [8]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [9]) _GUICtrlListBox_AddString($LISTBOX1, $Top10 [10]) EndFunc Edited February 14, 2008 by walle
weaponx Posted February 14, 2008 Posted February 14, 2008 You've already got a For/Next loop there, use it! _GUICtrlListBox_AddString($LISTBOX1, "________TOP10_______") For $I = 0 To $Top10 [0] _GUICtrlListBox_AddString($LISTBOX1, $Top10 [$I]) Next
Simucal Posted February 14, 2008 Posted February 14, 2008 (edited) Func TOP10() _GUICtrlListBox_ResetContent($LISTBOX1) $SOURCE = _INETGETSOURCE("http://www.swedvdr.org/browse.php?sort=7&type=desc") $Top10 = _StringBetween($SOURCE,"'><b>","</b></font></a><br>") _GUICtrlListBox_AddString($LISTBOX1, "________TOP10_______") For $I = 1 To UBound($Top10) - 1 _GUICtrlListBox_AddString($LISTBOX1, $Top10 [$I]) Next EndFunc Something like that. You weren't too far off. EDIT: My bad, was beaten to it Edited February 14, 2008 by Simucal AutoIt Scripts:Aimbot: Proof of Concept - PixelSearching Aimbot with several search/autoshoot/lock-on techniques.Sliding Toolbar - Add a nice Sliding Toolbar to your next script. Click the link to see an animation of it in action!FontInfo UDF - Get list of system fonts, or search to see if a particular font is installed.Get Extended Property UDF - Retrieve a files extended properties (e.g., video/image dimensions, file version, bitrate of song/video, etc)
walle Posted February 14, 2008 Author Posted February 14, 2008 Thanks for quick replays! Works, tried _GUICtrlListBox_AddString($LISTBOX1, $Top10 [$I]) once before, only added one string. For $I = 1 To UBound($Top10) 1 did the trick.
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