Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Need help with arrays! (dont add same arrays)

$
0
0

All the time I find it difficult to use arrays becouse all that redim, ubound stuff.. so I used variables alot!

I need func which would allow to add only unique arrays.

#include <Array.au3> $ArraySTORAGE=_ArrayCreate("") $ArraySTORAGE[0] = Ubound($ArraySTORAGE) - 1 $whattoadd = 'always other string' For $i = 1 To UBound($ArraySTORAGE) - 1 If  |$ArraySTORAGE contains| = $whattoadd Then ;;; Else _ArrayAdd($ArraySTORAGE ,$whattoadd ) Endif Next

Should I use  _ArraySearch() ?


Also I want to know how to clear whole array at once without using loop with _ArrayDelete()

+ I want to create 2D array but I dont know how to declare it in begining becouse all my elements would be added during the script (imputs/plits and so on..)

 

I hope you guys understand me :ermm:

 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>