Search the Community
Showing results for tags '2darray'.
-
Hi, It's been a while since I've used AutoIt, but I'm having fun with it again. I'm running on Windows 7 Pro, 64_bit. with AutoIt 3.3.14.2+ In my program, I've called Winlist(), so that I can get a list of all windows on the system. I then iterate through the titles, and attempt to copy the title & handle of Windows I'm specifically interested in. While this seems to be a very easy task, I'm having a strange problem copying the title & handle of the two windows that I'm interested in. In the For loop: For $i = 1 To $AllWindowsCount ConsoleWrite() displays the expected Title & handle, from the WindowsDupe array, so it appears that the copy from the $AllWindows array works as expected. However, when _ArrayDisplay($WindowsDupe) is called after the for loop, $WindowsDupe is empty. I wasn't able to find any functions in the help file, for copying entire arrays or certain elements, so I thought I would just copy them manually, as seen in the for loop. What am I doing wrong with the WindowsDupe array? Thanks Thanks My code is attached. ListWindows2.au3
-
I get a database result back as sometimes as single array and sometimes multi array (I understand that is bad practice in general and I am trying to fix that, because there are some errors in my database) but how can I error handle the best way or determine when something is single or multi array without making my script to break? I am very poor at @error handling in such cases for example $ncatid = $array[7] (because it is the answer i got back from database is multi array, that is because the item is unfortunate stored double which i am trying to fix in proper manner) I get the error of, Array variable has incorrect number of subscripts or subscript dimension range exceeded