Checks if a variable is an array type.
IsArray ( variable )
variable | The variable/expression to check. |
Success: | 1. |
Failure: | 0 if parameter is not an array variable. |
Can be useful to validate array/non-array parameters to user-defined functions.
See language datatypes for a detailed description.
IsBinary, IsBool, IsFloat, IsHWnd, IsInt, IsMap, IsNumber, IsPtr, IsString, VarGetType
#include <MsgBoxConstants.au3>
Example()
Func Example()
; Run Notepad
Run("notepad.exe")
; Wait 10 seconds for the Notepad window to appear.
Local $hWnd = WinWait("[CLASS:Notepad]", "", 10)
; Retrieve the position and size of the Notepad window by passing the handle to WinGetPos.
Local $aPos = WinGetPos($hWnd)
; Check if the variable is an array.
If IsArray($aPos) Then
MsgBox($MB_SYSTEMMODAL, "", "Window height: " & $aPos[3])
Else
MsgBox($MB_SYSTEMMODAL, "", "An error occurred.")
EndIf
; Close the Notepad window using the handle returned by WinWait.
WinClose($hWnd)
EndFunc ;==>Example