Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

For with array

$
0
0
How do you write this code to an array. I have 3675 to 3682 and another number which isn't in the same range (25834).

Func IsTest($id)
For $i = 3675 To 3682
If $id = Hex($i, 8) Then
Return True
Else
Return False
EndIf
EndFunc


I was thinking about

Func IsTest($id)
For $i = 3675 To 3682 & 25834
If $id = Hex($i, 8) Then
Return True
Else
Return False
EndIf
EndFunc


or

Func IsTest($id)
For $i = 3675 To 3682
If $id = Hex($i, 8) Then
Return True
Else
Return False
EndIf
Next
For $l = 25834
If $id = Hex($l, 8) Then
Return True
Else
Return False
EndIf
EndFunc


But these test doesn't work. Return as array incorrect prefix.

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>