Jump to content

Array


xzaz
 Share

Recommended Posts

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.

Link to comment
Share on other sites

#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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...