Jump to content

Recommended Posts

Posted

#Include <Array.au3>

$KeyOfC = _ArrayCreate("C", "D", "E", "F", "G", "A", "B")
$KeyOfG = _ArrayCreate("G", "A", "B", "C", "D", "E", "F#")

$Keys = _ArrayCreate($KeyOfC, $KeyOfG)

MsgBox(0, "Test", _ArraySearch($Keys, "C"))

I tried following but it just returns -1

Posted

The array isn't being populated in the above example, which is why ArraySearch is returning -1.

Is this what you're after?

#Include <Array.au3>

$KeyOfC = _ArrayCreate("C", "D", "E", "F", "G", "A", "B")
$KeyOfG = _ArrayCreate("G", "A", "B", "C", "D", "E", "F#")
$Keys = _ArrayCreate("")
_ArrayConcatenate($Keys, $KeyOfC)
 _ArrayConcatenate($Keys, $KeyOfG)
MsgBox(0, "Test", _ArraySearch($Keys, "C"))

Or were you attempting to create a two-dimensional array?

Posted

#Include <Array.au3>

$KeyOfC = _ArrayCreate("C", "D", "E", "F", "G", "A", "B")
$KeyOfG = _ArrayCreate("G", "A", "B", "C", "D", "E", "F#")

$Keys = _ArrayCreate($KeyOfC, $KeyOfG)

MsgBox(0, "Test", _ArraySearch($Keys, "C"))

I tried following but it just returns -1

In V3.2.12.0 Helpfile Changelog:

_ArrayCreate() documentation has been removed. The function is still present but may be removed at a later time. Scripts should be updated to use the array initialization syntax built into AutoIt.

muttley

I'm still unsure what you wish to achieve though.

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...