Sends the contents of a 1D or 2D array to the clipboard, each element separated by a specified delimiter
#include <Array.au3>
_ArrayToClip ( Const ByRef $aArray [, $sDelim_Col = "|" [, $iStart_Row = -1 [, $iEnd_Row = -1 [, $sDelim_Row = @CRLF [, $iStart_Col = -1 [, $iEnd_Col = -1]]]]]] )
$aArray | Array to copy to clipboard |
$sDelim_Col | [optional] Delimiter for elements of 1D array or columns of 2D array |
$iStart_Row | [optional] Index of array row to start copy |
$iEnd_Row | [optional] Index of array row to stop copy |
$sDelim_Row | [optional] Delimiter for rows of 2D array (2D only) |
$iStart_Col | [optional] Index of array column to start copy (2D only) |
$iEnd_Col | [optional] Index of array column to stop copy (2D only) |
Success: | 1. |
Failure: | 0 and sets the @error flag to non-zero. |
@error: | -1 - ClipPut() failed Other - See _ArrayToString() description for @error |
#include <Array.au3>
#include <MsgBoxConstants.au3>
Local $aArray = StringSplit("A,B,C,D,E,F,G,H,I", ",")
_ArrayDisplay($aArray, "1D Array")
_ArrayToClip($aArray, " - ", 1, 6)
MsgBox($MB_SYSTEMMODAL, "_ArrayToClip() 1D Test", ClipGet())
Local $aArray[4][4]
For $i = 0 To 3
For $j = 0 To 3
$aArray[$i][$j] = $i & $j
Next
Next
_ArrayDisplay($aArray, "2D Array")
_ArrayToClip($aArray, " :: ", 1, 2, Default, 1, 2)
MsgBox($MB_SYSTEMMODAL, "_ArrayToClip() 2D Test", ClipGet())