How do I work with 2D arrays. I've tried this but get errors.
Local $aTest = [[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]]
;$aTest = [10,11,12] ; Error at 
Local $sTest = ""
For $i = 0 To UBound($aTest)-1
Local $aExtract = _ArrayExtract($aTest,$i,$i)
$sTest = $sTest & MyTest($aExtract)
; Error at v $aTemp
Return String($aTemp) & " - " & String($aTemp) & " - " & String($aTemp) & @CRLF
My esteemed Autoits I need your help once again.
I'm trying to figure out how to create a loop that gets 1 value from an array and repeats until each value from the array has been used. I have never used arrays before and I know once I learn more things should get easier for me.
Here is what Im trying to do:
-Have an array of values that determine what application i log into. ex: app1, app2, app3, app4 etc.
-Have a loop that repeats a process sequentially using each value in the array to finish the process for each app1, app2, app 3 and so forth. I have 30 apps that I need to update on a regular basis and getting this sorted out is what I perceive to be the best way to do it.
Here is my feeble attempt that obviously fails:
local $array = ["10", "11", "12",etc etc]
;;Local $site = InputBox("ERx Site","What site do you want to login as?","","")
Local $userid = InputBox("ERx Login", "What is your username?", "", "")
Local $Passwd = InputBox("Security Check", "Enter your UAT password.", "", "*")
for $1 = 1 to 30(I need to do the same steps in 30 different apps)
Send (Sequential ARRAY VALUE HERE)
your help is greatly appreciated.
Thanks for your time
I am fairly new to AutoIT and I am still trying to learn, I have been using _FileListToArray to list all the files with a particular extension in an array and then loop through it for operation ( For $i = 1 To UBound($FileArray) - 1).
So far this has been working fine. But I am not able to figure out a problem that I have; what if I have 50 files but I only want to loop through first 10 files and then next ten and so on? Or rather I should say, how I can I only feed max 10 files to the array at a time when I do _FileListToArray regardless of the total number of files in the folder?
Any insight/help will be much appreciated
I'm trying to get an array from a website so that I can just get the url, but I am not sure how. I read a bit of arrays but I have a feeling I'd have to be writing a lot more than what I should be. I will include the script I have so far and the API url for what I want.
API: https://api.fast.com/netflix/speedtest?https=true&token=YXNkZmFzZGxmbnNkYWZoYXNkZmhrYWxm&urlCount=1 (I want the 'url' array that contains the url)
#include <MsgBoxConstants.au3> #include <Inet.au3> #include <Array.au3> $site = _INetGetSource('http://api.fast.com/netflix/speedtest?https=true&token=YXNkZmFzZGxmbnNkYWZoYXNkZmhrYWxm&urlCount=1') MsgBox($MB_SYSTEMMODAL, "Title", $site)
Alright, currently I'm trying to merge two loops:
Local $aArray For $iLoop = 1 to 100 $aArray[$iLoop - 1] = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration", $iLoop) If @error <> 0 Then ReDim $aArray[$iLoop - 1] ExitLoop EndIf Next For $iLoop1 = 0 to UBound($aArray, 1) - 1 For $iLoop2 = 1 to 12 $aArray[$iLoop1][$iLoop2] = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\" & $aArray[$iLoop1], $iLoop2) If @error <> 0 Then ExitLoop Next Next
into one. Here's what I have so far:
Local $aArray For $iLoop1 = 0 to UBound($aArray, 1) - 1 For $iLoop2 = 0 to 12 ConsoleWrite("Loop1 = " & $iLoop1 & ", Loop2 = " & $iLoop2 & @CRLF) If $iLoop2 = 0 Then $aArray[$iLoop1] = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration", $iLoop1 + 1) If @error <> 0 Then ReDim $aArray[$iLoop1 + 1] ExitLoop EndIf Else $aArray[$iLoop1][$iLoop2] = RegEnumKey("HKLM\SYSTEM\CurrentControlSet\Control\GraphicsDrivers\Configuration\" & $aArray[$iLoop1], $iLoop2) If @error <> 0 Then ExitLoop EndIf Next Next And it keeps error-ing out trying to exceed the dimension range of the array. Does the Loop not recheck the size of the array after the original check or am I doing something else wrong.