Logii Posted August 24, 2012 Posted August 24, 2012 Hey, i need some help :/ How can i make this Script run 18 times with a For - Next Loop? I need it like $LVI_$i ;For $i = 0 To 18 Step 1 If _GUICtrlListView_GetItemText($LV_PLAYERLIST, $LVI_00) <> $RECV_UPDATE[2] Then _GUICtrlListView_DeleteItem($LV_PLAYERLIST, $LVI_00) $LVI_00 = _GUICtrlListView_AddItem($LV_PLAYERLIST, "00 / " & $RECV_UPDATE[2]) EndIf ;Next Thanks!
Moderators Melba23 Posted August 24, 2012 Moderators Posted August 24, 2012 Logii, Welcome to the AutoIt forum. It is difficult to be specific without more code, but something like this might well work for you: ; Declare an array at the top of your script Global $aLVI[18] ; Loop 18 times For $i = 0 To 17 ; The array runs from 0 - 17 - Step is always 1 unless defined otherwise ; Now loop through the array If _GUICtrlListView_GetItemText($LV_PLAYERLIST, $LVI[$i]) <> $RECV_UPDATE[2] Then _GUICtrlListView_DeleteItem($LV_PLAYERLIST, $LVI[$i]) $LVI[$i] = _GUICtrlListView_AddItem($LV_PLAYERLIST, $i & " / " & $RECV_UPDATE[2]) EndIf Next Any help? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Logii Posted August 24, 2012 Author Posted August 24, 2012 Hey, thank you This is what i need! I just needed to change the $aLVI[18] to $LVI[18] If i need more help i'll write in this thread (just one post left after that one :/)
Logii Posted August 24, 2012 Author Posted August 24, 2012 Hey, and how does it look when i want to create 18x 2 dimensional arrays? ;Global $IW5MP_PLAYER0[18][45] ------ MemoryRead & Stringsplit are returning 45 Values - i can get one of them with $IW5MP_PLAYER0[9] for example ;For $i = 0 To 18 $IW5MP_PLAYER0 = StringSplit(_MemoryRead("0x" & IniRead(@ScriptDir & "data.ini","PLAYER","0",""), $IW5MPProcess, 'char[1024]'),"") $IW5MP_PLAYER1 = StringSplit(_MemoryRead("0x" & IniRead(@ScriptDir & "data.ini","PLAYER","1",""), $IW5MPProcess, 'char[1024]'),"") .... $IW5MP_PLAYER17 = StringSplit(_MemoryRead("0x" & IniRead(@ScriptDir & "data.ini","PLAYER","17",""), $IW5MPProcess, 'char[1024]'),"") ;Next I cant figure it out
Moderators Melba23 Posted August 24, 2012 Moderators Posted August 24, 2012 Logii, Call of Duty Modern Warfare 3 [iW5MP.exe]Have you read the Forum Rules? Particularly the bit which says: "Do not discuss any of the following: Automating games or game servers. This rule is zero tolerance" Well, have you ? M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
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