blumi Posted November 26, 2010 Posted November 26, 2010 What is the easiest way with autoit to count the values of an array?
AdmiralAlkex Posted November 26, 2010 Posted November 26, 2010 You mean add them together? You do that the same way you do everything with an array, a loop. Global $aiArray[3] = [14, 13, 23] Global $iResult For $iX = 0 To UBound($aiArray) -1 $iResult += $aiArray[$iX] Next ConsoleWrite($iResult & @CRLF) .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
blumi Posted November 26, 2010 Author Posted November 26, 2010 No not add them together. I am sure it is so easy but I didn't found it. Just want to know how many items the array consists of. Global $aiArray[3] = [14, 13, 23] I want to get 3 as result for this example array.
AdmiralAlkex Posted November 26, 2010 Posted November 26, 2010 Look at the function UBound() .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
blumi Posted November 26, 2010 Author Posted November 26, 2010 Okay, that's it, thought it would be easy. ;-) Never used this function before, just a beginner with autoit. Thank you.
MvGulik Posted November 26, 2010 Posted November 26, 2010 Read my lips "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ...
AdmiralAlkex Posted November 27, 2010 Posted November 27, 2010 Okay, that's it, thought it would be easy. ;-)Never used this function before, just a beginner with autoit. Thank you.There's a Array tutorial in the wiki, you may want to read it .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now