Advertisement
Guest User

Untitled

a guest
Oct 13th, 2015
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.44 KB | None | 0 0
  1. Local $iMax
  2.  
  3. Local $data = "Element 1|Element 2|Element 3"
  4.  
  5. ; The string in data will be split into an array everywhere | is encountered
  6. Local $arr = StringSplit($data, "|")
  7.  
  8. If IsArray($arr) Then
  9.      $iMax = UBound($arr); get array size
  10.  
  11.      ConsoleWrite("Items in the array: " & $iMax & @LF)
  12.  
  13.      For $i = 0 to $iMax - 1; subtract 1 from size to prevent an out of bounds error
  14.          ConsoleWrite($arr[$i] & @LF)
  15.      Next
  16. EndIf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement