Jump to content

Can't get row 0 from 2D array with _ArrayToString


Recommended Posts

Hi, How do I get row 0 from 2D array with _ArrayToString?

My first MsgBox gives me the entire 2D array as a string instead of just row 0. I am able to get the intended result with all other rows.

 

#include <Array.au3>
#include <MsgBoxConstants.au3>
Local $aArray[10][10]
For $i = 0 To 9
    For $j = 0 To 9
        $aArray[$i][$j] = $i & "-" & $j
    Next
Next
_ArrayDisplay($aArray, "2D Array")
MsgBox($MB_SYSTEMMODAL, "Rows 4-7,  cols 2-5", _ArrayToString($aArray, " :: ", 0, 0, @CRLF, 0, 0))
MsgBox($MB_SYSTEMMODAL, "Rows 4-7,  cols 2-5", _ArrayToString($aArray, " :: ", 1, 1, @CRLF, 0, 0))

 

Thanks,

Matt.

Link to comment
Share on other sites

mattschinkel,

it is always a good idea to add the version of AutoIt you use. Saves us a lot of time :)

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

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