Jump to content

Need help with _arraySearch


Recommended Posts

I have a simple CSV file with 2 columns.  I want to search for the value in the first column and return the value in the second.  I have experimented with _arraysearch and can get it to retrun the correct row, but I can figure out how to get the value of the second column.  I am sure this very simple, any help would be appreciated. Here is the code I have been playing with:

#include <File.au3>
#include <Array.au3>
#include <MsgBoxConstants.au3>
$tag = 1234

Local $aRetArray, $sFilePath = @ScriptDir & "\index.csv"
  _FileReadToArray($sFilePath, $aRetArray,"",",")
  _ArrayDisplay($aRetArray, "", Default, 8)
 $row = _ArraySearch($aRetArray, $tag,"","","","", 1)
 MsgBox(0,"This finds the row", $row)

 

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