Jump to content

Recommended Posts

Posted

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
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted

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 :/)

Posted

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
Posted

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 ? :huh:

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...