Sign in to follow this  
Followers 0
xzaz

Array

4 posts in this topic

Alright i got this with the include for the Array:

$q_code = InputBox("Code..","Code","","*")
Dim $avArray[3]
                $avArray[0] = "test1"
                $avArray[1] = "test2"
                $avArray[2] = "test3"
            If $q_code = $avArray Then
; Go futher
oÝ÷ Ø    Ýjëh×6
$q_code = InputBox("Code..","Code","","*")
Dim $avArray[3]
                $avArray[0] = "test1"
                $avArray[1] = "test2"
                $avArray[2] = "test3"
            If $q_code = IsArray($avArray) Then
; Go futher

I read this but i dont understand it:

http://www.autoitscript.com/autoit3/docs/i...g_variables.htm

So he has to check if the string in the Inputbox is one in the array.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

#Include<Array.au3>
Dim $Array[6]
$Array[0] = "String0"
$Array[1] = "String1"
$Array[2] = "String2"
$Array[3] = "String3"
$Array[4] = "String4"
$Array[5] = "String5"

$Input = InputBox("ArraySearch Demo", "String To Find?")
If @error Then Exit

$Pos = _ArraySearch ($Array, $Input)
Select
    Case $Pos = -1
        MsgBox(0, "Not Found", '"' & $Input & '" was not found in the array.')
    Case Else
        MsgBox(0, "Found", '"' & $Input & '" was found in the array at pos ' & $Pos & ".")
EndSelect

Sry, dindt search right ^^

Edited by xzaz

Share this post


Link to post
Share on other sites

No, i had first the script in the first posts. Next i search for a function that could check a array. But dint search with "_Arrayxxxx"

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0