thisisonlyatest Posted March 15, 2022 Posted March 15, 2022 local $arr = stringsplit($fFile, "," ) ;this gets my text file with string of numbers testloopArray($arr);variable to work with Func testloopArray(Const $array) Local Const $arrayLength = UBound($array) For $i = 1 To $arrayLength - 1 ;outputs starting at first line Local $k = $array[$i] Local $P=0 Do send("{}") send("{}") sleep (500) send("{}") sleep (1000) MouseClick("left", 559, 107, 1, 5 ) $P = $P + 1 Until $k = $P ;counter Send("{CTRLDOWN}") Send("{TAB}") send("{CTRLUP}") Next ; think i need some way to end this when i come to end of string it loops through array EndFunc The array gets my text file.... which has a string of numbers each number tells my loop do run that many times.... ends with ctrl tab command and continues to next number in array...... but its stuck in loop in regards to the array it goes through my array of numbers correctly but then start back over the do loop works fine tried a few different things but i think im missing something obvious.....
Subz Posted March 15, 2022 Posted March 15, 2022 Basically you're telling it to loop through x amount of times within the do loop, visual example: Local $aArray[] = [1,2,3,4,5] testloopArray($aArray) Func testloopArray($_aArray) Local $iCounter = 0 For $i = 0 To UBound($_aArray) - 1 $iCounter=0 ConsoleWrite("ArrayNo. = " & $i & @CRLF & "Array Value = " & $aArray[$i] & @CRLF) Do ConsoleWrite('Count = ' & $iCounter + 1 & @CRLF & '{}{}{}Sleep(1000)MouseClick("left", 559, 107, 1, 5 )' & @CRLF) $iCounter += 1 Until $_aArray[$i] = $iCounter ConsoleWrite(@CRLF & " ========================================================== " & @CRLF) Next EndFunc
thisisonlyatest Posted March 16, 2022 Author Posted March 16, 2022 Thanks was able to use this as reference and correct it
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