Hello!
1 Closed) Am I right that _ArrayBinarySearch needs that every element in a sorted array had a unique binary (and in most cases usual string) representation? So if I have two or more identical string elements, e.g. "2007/08/01" and "2007/08/01" (which must have identical binary represent. as I think), function will produce unexpected results?
In this code function finds only 10 and 11 elements. So I have to use slower _ArraySearch?
2) And another arrays question: Do _ArrayDelete and _ArrayAdd have a big influence on speed while working with 1D or 2D array like [3500] Or [3500][2]?
3) Now question about console windows. Is there an way to get output from console window, which is already executed. I also don't like using Run function with $STDOUT_CHILD flag, because it hide console program output from the user, while I need a possibility to manual interact with console without restarting it.
Is it the only right way? :
It utilizes mouse right click, then "select all" command, then send ENTER to copy selected text and in the end it checks this string for requested data.
4) And last question: Are there any restrictions while using _FileListToArray with $sPath=folder at a linked net disk? I use it for getting list of all files with defined extension in specified folder and it's subfolders. It seems to work fine on my internal hdd with 10 subfolders and about 100 files at all, while connected net disk have about 30 folders and each folder may include more than 1000-1500 files (but with right extension only 15-25 files).
THANKS a lot!
1 Closed) Am I right that _ArrayBinarySearch needs that every element in a sorted array had a unique binary (and in most cases usual string) representation? So if I have two or more identical string elements, e.g. "2007/08/01" and "2007/08/01" (which must have identical binary represent. as I think), function will produce unexpected results?
[ autoit ]
#include <Array.au3> ; Local $avArray[21]=["2007/09/30", _ "2007/09/30", _ "2007/10/01", _ "2007/10/05", _ "2007/10/05", _ "2008/01/03", _ "2008/01/03", _ "2008/01/03", _ "2008/01/03", _ "2008/01/03", _ "2008/01/03", _ "2008/01/03", _ "2008/04/27", _ "2008/04/27", _ "2008/04/27", _ "2008/11/11", _ "2008/11/30", _ "2008/11/30", _ "2008/11/30", _ "2009/03/17", _ "2009/03/17"] _ArrayDisplay($avArray,"before") _ArraySort($avArray) _ArrayDisplay($avArray,"after") ;nothing changed, array data has been already entered in ascending order ; $wz=0 $indBS=0 While $indBS<>-1 $indBS=_ArrayBinarySearch($avArray,"2008/01/03",$wz) If $indBS<>-1 Then MsgBox(0,"1",$indBS&" "&$avArray[$indBS]) $wz=$indBS+1 WEnd
2) And another arrays question: Do _ArrayDelete and _ArrayAdd have a big influence on speed while working with 1D or 2D array like [3500] Or [3500][2]?
3) Now question about console windows. Is there an way to get output from console window, which is already executed. I also don't like using Run function with $STDOUT_CHILD flag, because it hide console program output from the user, while I need a possibility to manual interact with console without restarting it.
Is it the only right way? :
[ autoit ]
;Select all text and copy it from the console Func ConsoleC() ;Get it's center $wp=WinGetPos($wh) MouseClick("right",($wp[0]+($wp[2]/2)),($wp[1]+($wp[3]/2)),1,0) Sleep(100) SendP("ы") SendP("{ENTER}") Return ClipGet() EndFunc ;Check console for specified output Func CheckC($outp) While StringInStr(ConsoleC(),$outp)=0 Sleep(300) WEnd EndFunc
4) And last question: Are there any restrictions while using _FileListToArray with $sPath=folder at a linked net disk? I use it for getting list of all files with defined extension in specified folder and it's subfolders. It seems to work fine on my internal hdd with 10 subfolders and about 100 files at all, while connected net disk have about 30 folders and each folder may include more than 1000-1500 files (but with right extension only 15-25 files).
THANKS a lot!