Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 04/19/2018 in all areas

  1. ISI360

    ISN AutoIt Studio

    Good news about your probelm @Xandy: By random i saw that this problem does not happen if i use the _WinAPI_OpenFileDlg function for open file dialogs. (And not the native FileOpenDialog). It´s not the same dialog, but hey it works and the text is readable at all So i will include this with the next hotfix update. (Without skin...the current dialog. With skin the _WinAPI_OpenFileDlg Dialog)
    2 points
  2. ISI360

    ISN AutoIt Studio

    @Xandy: Thanks for the video. Yeah i know that error...problem is i can´t do much against it. The problem is caused by the Skin used in the "black theme". If you use the ISN without a Skin it works normal. So the problem here is anywhere in the .msstyles file and i have no plan how i could fix this (And i think the USkin System (which the ISN uses for skinning) was orginally designed for windows XP @masvil: The ISN AutoIt Studio has it´s own GUI builder included and does not need Koda. (It´s the ISN Form Studio 2) Just create an .isf file (file the File menu) and open it (Or see the testproject)
    2 points
  3. Another skin: $vParamData = 'pipe test=this \| is a pipe|example=value|another\|example=five|last \|one = one\|two\|three' $aRegEx = StringRegExp($vParamData, '(.+?)=((?:\\\||[^\\|])+)(?:\||$)', 3) _ArrayDisplay($aRegEx)
    2 points
  4. Hello Again! I previously stumbled upon a topic asking for maps datatype's instructions... I too wasn't sure what a map is until I tried it... So I am making this topic to help other newbies (and some oldbies) better understand the Maps datatype of AutoIt! Lets start! A Note for Readers The maps datatype is still in development and is currently in Alpha Stage (More Risky than Beta) and its unstable, so AutoIt can crash indefinably while using Maps! I can't guarantee if this will be implemented in stable versions, this is a fairly new thing to AutoIt coders & in my honest opinion I don't see any use for it Maps are the best datatype in AutoIt, Very Useful ... Not hurting anyone though . Also the maps datatype is DISABLED IN STABLE VERSIONS, So you need to install the latest beta version of AutoIt to make maps work . If you find any bugs while using a map, please report it in the Official Bug Tracker Introduction To Maps Maps are just like arrays, instead they use "keys" to access elements inside them... A key can be either a string or an integer (Other datatypes work too but they are converted to a integer [Equivalent to Int($vKey)] before assignment [Source]). Although Integers don't represent the order of elements in a map unlike in an array... Declaring Maps Its similar to declaring an Array: ; This is the only way to declare a map ; You must have a declarative keyword like Dim/Global/Local before the declaration unless the map is assigned a value from a functions return Local $mMap[] ; Don't insert any numbers or strings it! Simple, Isn't it? Using Maps Using maps is similar to arrays (again!): Local $mMap[] ; Lets declare our map first! ; Adding data to maps is easy... ; This is our key ; | ; v $mMap["Key"] = "Value" ; <--- And our value! ; A key is Case-Sensitive meaning "Key" is not same as "key"! $mMap["key"] = "value" ; Not the same as $mMap["Key"]! ; There are 2 different ways to access an element in a map $mMap["Key"] ; 1st Method $mMap.Key ; 2nd Method Enumerating Maps Its quite easy to enumerate through arrays but what about maps? how can I enumerate through them!? #include <MsgBoxConstants.au3> ; Lets create our map first Local $mMap[] ; Lets add some information to the map, feel free to modify & add new elements $mMap["Name"] = "Damon Harris" $mMap["Alias"] = "TheDcoder" $mMap["Gender"] = "Male" $mMap["Age"] = 14 $mMap["Location"] = "India" $aMapKeys = MapKeys($mMap) ; MapKeys function returns all the keys in the format of an array Local $sProfile = "Profile of " & $mMap["Name"] & ':' & @CRLF ; We will use this string later For $vKey In $aMapKeys ; We use this to get the keys in a map :) $sProfile &= @CRLF & $vKey & ': ' & $mMap[$vKey] ; Add some details to the profile string using our map! Next MsgBox($MB_ICONINFORMATION + $MB_OK, "Profile", $sProfile) ; Finally display the profile :) It is easy as always Multi-Dimensional Maps Now now... I know that you are a little confused that how can an multi-dimensional maps exist... Although I am not 100% sure if its called that but lets continue: #include <MsgBoxConstants.au3> ; Multi-Dimensional maps are just maps in a map Local $mMapOfMapsvilla[] ; This map will store an other map Local $mParkMap[] ; This Park map will be inserted in the Mapsvilla's map :P $mMapOfMapsvilla["Map Item 1"] = "Town Hall" $mMapOfMapsvilla["Map Item 2"] = "Police Station" $mMapOfMapsvilla["Map Item 3"] = "Shopping Mall" $mMapOfMapsvilla["Map Item 4"] = "Residential Area" $mMapOfMapsvilla["Map Item 5"] = "Park" $mParkMap["Map Item 1"] = "Cottan Candy Stand" $mParkMap["Map Item 2"] = "Public Toilet" $mParkMap["Map Item 3"] = "Woods" $mMapOfMapsvilla.Park = $mParkMap MsgBox($MB_OK, "Map Location", $mMapOfMapsvilla["Map Item 1"]) ; Will display Town Hall MsgBox($MB_OK, "Map Location", $mMapOfMapsvilla.Park["Map Item 1"]) ; Will display Cottan Candy Stand I am sure its easy for you to understand now Frequently Asked Questions (FAQs) & Their answers Q #1. Help! My code does not respond to anything (or) I get an "Variable subscript badly formatted" error on the line of declaration... A. DONT USE F5 or Go, Instead use Alt + F5 or Tools -> Beta Run in SciTE (Make sure that you have Beta installed) Q #2. Why are you using "m" in-front of every map variable? A. Best coding Practices: Names of Variables Q #3. What are "Elements" which you mention frequently??? A. This is a newbie question (I have no intention of insulting you ), so I guess you are new to programming. "Elements" are data slots inside a Map (or an Array), you can imagine elements as individual variable which are stored in a Map. You can access them using "keys", Please refer to "Introduction to Maps" section at the starting of this post Q #4. Are Maps faster than Arrays? A. You need to understand that Maps have different purpose than Arrays. Maps are designed to store data dynamically (like storing information for certain controlIDs of GUI) and Arrays are designed to store data in a order (for instance, Storing every character of a string in an element for easy access). If you still want to know then if Maps are faster, then the answer is maybe... Maps are *supposed* (I am not sure ) to be faster in addition of elements (while Arrays are painfully slow while adding or removing elements). Here (Post #24) is a benchmark (Thanks kealper! ) More FAQs coming soon! Feel free to ask a question in the mean while
    1 point
  5. ISI360

    ISN AutoIt Studio

    Note: This is the continuation thread from the original one of 2012. The old one growed over 50 pages...so to make the overview better i created a new main thread for the ISN AutoIt Studio. You can find the old original thread here. The ISN AutoIt Studio is a complete IDE made with AutoIt, for AutoIt! It includes a GUI designer, a code editor (with syntax highlighting, auto complete & intelisense), a file viewer, a backup system and a lot more features!! Here are some screenshots: Here are some higlights: Easy to create/manage/public your AutoIt projects! Integrated GUI-Editor (ISN Form Studio 2) Integrated file & projectmanager Auto backupfunction for your Projects Extendable with plugins! Available in several languages Trophies Syntax highlighting /Autocomplete / Intelisense Macros Changelog manager for your project Detailed overview of the project (total working hours, total size...) Am integrated To-Do List for your project Open Source (You can download the source code from my website) And much much more!!! -> -> Click here to download ISN AutoIt Studio <- <- Here is the link to the german autoit forum where I posted ISN AutoIt Studio the first time: Link For more information visit my Homepage: https://www.isnetwork.at So, have fun with the ISN AutoIt Studio! And feel free to post your feedback, bugreports or ideas for this project here in this thread!
    1 point
  6. INTERIM VERSION 11 Mar 21 A bug in the x64 implementation of some the library TreeView functions meant that some replacement working functions were added to the UDF. Now the Beta TreeView library (from 15.3) has been modified, these functions are no longer required, but they will remain until the modified library is formally released. However, other changes in the Beta mean that the replacement functions will not work under it - don't you just love compatibility problems! So here is an interim release with a modified replacement function so that it will function with Release and Beta versions under both x32 and x64 - I hope! New UDF and examples in zip below. Previous version descriptions: ChangeLog.txt I was fed up with using the native FileOpenDialog and FileSelectFolder which appeared anywhere on the screen in seemingly random sizes and often allowed users to select files from other than the path desired. So I decided to write my own version of an Explorer-type treeview and here it is: ChooseFileFolder. What are the main advantages of this UDF over the normal dialogs? Common format for both file and folder selection. Ability to size and place the dialog where you want it rather than how Windows last left it. Ability to select (and delete) multiple items - even from different folders or drives. You can also select both files and folders from the same tree Ability to preselect items. And there is also a function to allow you to use an existing treeview in your own GUI to display the folder tree - no need to have a dialog at all. Here is a zip file with the UDF and several example scripts: ChooseFileFolder.zip As usual happy to take feedback and, preferably, plaudits. M23
    1 point
  7. That did the trick thank you! Run("notepad.exe") GLOBAL $One = ('Line1' & @CRLF & _ 'Line2' & @CRLF & _ 'Line3' & @CRLF & _ 'Line4' & @CRLF & _ 'Line5') ClipPut($One) $Notepad = WinWait("[CLASS:Notepad]", "", 10) ControlSend("Untitled - Notepad", "", "", ("^v"))
    1 point
  8. Try putting it before the _ line continue char Has to equate to a valid string
    1 point
  9. A single dot is the current directory a double dot is the parent directory If you do a Dir from the command prompt you will see that these are always the first 2 listed. They are mostly used for specifying paths relative to the current directory.
    1 point
  10. add a @CRLF between lines
    1 point
  11. Try something like this here: #include <GDIPlus.au3> #include <GUIConstantsEx.au3> _GDIPlus_Startup() Global $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Dimp.png") Global $aDim = _GDIPlus_ImageGetDimension($hImage) Global $hImage_Negative = _GDIPlus_BitmapCreateNegative($hImage) Global $hGUI = GUICreate("Test", $aDim[0], $aDim[1]) GUISetState() Global $hCanvas = _GDIPlus_GraphicsCreateFromHWND($hGUI) _GDIPlus_GraphicsDrawImageRect($hCanvas, $hImage_Negative, 0, 0, $aDim[0], $aDim[1]) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE _GDIPlus_GraphicsDispose($hCanvas) _GDIPlus_ImageDispose($hImage_Negative) _GDIPlus_ImageDispose($hImage) _GDIPlus_Shutdown() Func _GDIPlus_BitmapCreateNegative($hBitmap) Local $aDim = _GDIPlus_ImageGetDimension($hBitmap) Local $hBitmap_Neg = _GDIPlus_BitmapCreateFromScan0($aDim[0], $aDim[1]) Local $hGfx = _GDIPlus_ImageGetGraphicsContext($hBitmap_Neg) Local $hIA = _GDIPlus_ImageAttributesCreate() Local $tNegMatrix = _GDIPlus_ColorMatrixCreateNegative() Local $pNegMatrix = DllStructGetPtr($tNegMatrix) _GDIPlus_ImageAttributesSetColorMatrix($hIA, 0, True, $pNegMatrix) _GDIPlus_GraphicsDrawImageRectRect($hGfx, $hBitmap, 0, 0, $aDim[0], $aDim[1], 0, 0, $aDim[0], $aDim[1], $hIA) _GDIPlus_ImageAttributesDispose($hIA) _GDIPlus_GraphicsDispose($hGfx) Return $hBitmap_Neg EndFunc ;==>_GDIPlus_BitmapCreateNegative
    1 point
  12. @aa2zz6 you want to load the attached image (DIMP) and invert the colors?
    1 point
  13. #include <WinAPI.au3> #include <GDIPlus.au3> #include <GuiConstants.au3> #include <WindowsConstants.au3> HotKeySet("{Esc}", "_Exit") Opt("GUIOnEventMode", 1);0=disabled, 1=OnEvent mode enabled _GDIPlus_Startup() $hBitmap = _GDIPlus_BitmapCreateFromFile(@ScriptDir & "\328 Main Street.jpg") ; create a bitmap object from file $hBmp = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hBitmap) $iW = _GDIPlus_ImageGetWidth($hBitmap) $iH = _GDIPlus_ImageGetHeight($hBitmap) _GDIPlus_BitmapDispose($hBitmap) $hGui = GUICreate("Invert Colours Example", $iW, $iH) GUISetOnEvent(-3, "_Exit") GUISetState() $hGraphicGUI = _GDIPlus_GraphicsCreateFromHWND($hGui) $hBMPBuff = _GDIPlus_BitmapCreateFromGraphics($iW, $iH, $hGraphicGUI) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hBMPBuff) $hdc = _WinAPI_GetDC(0) $hcdc = _WinAPI_CreateCompatibleDC($hdc) $hcbmp = _WinAPI_CreateCompatibleBitmap($hdc, $iW, $iH) _WinAPI_SelectObject($hcdc, $hcbmp) $hcdc2 = _WinAPI_CreateCompatibleDC($hdc) _WinAPI_SelectObject($hcdc2, $hBmp) _WinAPI_BitBlt($hcdc, 0, 0, $iW, $iH, $hcdc2, 0, 0, $NOTSRCERASE) $gc = _GDIPlus_GraphicsCreateFromHDC($hdc) $bmp = _GDIPlus_BitmapCreateFromHBITMAP($hcbmp) _GDIPlus_GraphicsDrawImage($hGraphic, $bmp, 0, 0) $sFileName = @DesktopDir & "\results.jpg" _GDIPlus_ImageSaveToFile($bmp, $sFileName) ;ShellExecute(@DesktopDir & "\328 Main Street_New.jpg") _GDIPlus_GraphicsDispose($gc) _GDIPlus_ImageDispose($bmp) _WinAPI_DeleteObject($hcbmp) GUIRegisterMsg(0xF, "MY_PAINT"); Register PAINT-Event 0x000F = $WM_PAINT (WindowsConstants.au3) GUIRegisterMsg(0x85, "MY_PAINT"); $WM_NCPAINT = 0x0085 (WindowsConstants.au3)Restore after Minimize. _GDIPlus_GraphicsDrawImage($hGraphicGUI, $hBMPBuff, 0, 0) While 1 Sleep(100) WEnd Func _Exit() _GDIPlus_GraphicsDispose($hGraphic) _GDIPlus_GraphicsDispose($hGraphicGUI) _WinAPI_DeleteObject($hBMPBuff) _WinAPI_ReleaseDC(0, $hdc) _WinAPI_DeleteDC($hcdc) _WinAPI_DeleteDC($hcdc2) _WinAPI_RedrawWindow(0, 0, 0, BitOR($RDW_INVALIDATE, $RDW_UPDATENOW, $RDW_ALLCHILDREN)) _GDIPlus_Shutdown() Exit EndFunc ;==>_Exit Func MY_PAINT($hWnd, $msg, $wParam, $lParam) ; Check, if the GUI with the Graphic should be repainted _GDIPlus_GraphicsDrawImage($hGraphicGUI, $hBMPBuff, 0, 0) _WinAPI_RedrawWindow($hGui, "", "", BitOR($RDW_INVALIDATE, $RDW_UPDATENOW, $RDW_FRAME)); , $RDW_ALLCHILDREN Return $GUI_RUNDEFMSG EndFunc ;==>MY_PAINT
    1 point
  14. @CFipp53 I believe that you would add this option to $sDesiredCapabilities. P.S. There's a general support thread for this UDF here.
    1 point
  15. #Include <Array.au3> $vParamData = 'pipe test=this \| is a pipe|example=value|another\|example=five|last \|one = one\|two\|three' $aRegEx = StringSplit(StringRegExpReplace($vParamData, '(?<!\\)\|', '='), "=", 3) _ArrayDisplay($aRegEx)
    1 point
  16. Deye

    HotKey UDF

    x_bennY, Maybe you want to "_HotKey_Disable \ Enable" at the calling function's enter \ exit times I never used this UDF before.. , Please note that your reproducer doesn't tell us much as to how .. Or why this happening there, it isn't a complete reproducer ..
    1 point
  17. Might be able to pull off reusing the capture.... $vParamData = 'pipe test=this \| is a pipe|example=value' msgbox(0, '' , stringreplace(stringregexpreplace($vParamData , "(\\\|)|(=)|(\|)" , "$1" & @LF ) , "\|" & @LF , "\|")) and without the additional stringreplace, but becoming much more fragile (but works for this specific case). $vParamData = 'pipe test=this \| is a pipe|example=value' msgbox(0, '' , stringregexpreplace($vParamData , "(\\\|.*)\||=|(=)|(\|)" , "$1" & @LF ))
    1 point
  18. ; mask the pipe with a char combination, i.e. "@#" $vParamData = 'pipe test=this @# is a pipe|example=value' $aRegEx = StringRegExp($vParamData, '([^|=]+)=([^|]+)', 3) For $i = 0 To UBound($aRegEx) -1     $aRegEx[$i] = StringReplace($aRegEx[$i], '@#', '|') ; now replace with the pipe Next _ArrayDisplay($aRegEx)
    1 point
  19. there are more efficient ways to do the pieces, but here is replacement method that simply avoids the escaped pipes and then slaps it all back together #include<array.au3> $vParamData = 'pipe test=this \| is a pipe|example=value' $aData = stringsplit(stringreplace(_ArrayToString(stringsplit(stringreplace($vParamData , "\|" , "\*") , "|" , 2) , "=") , "\*" , "\|") , "=" , 2) _ArrayDisplay($aData)
    1 point
  20. I personally like to use AdLibRegister() when I need things to repeat or be time based. https://www.autoitscript.com/autoit3/docs/functions/AdlibRegister.htm Normally it's used for things to repeat over and over in a small time window, but I see no reason it can not be used for long duration's as well. So you can get a pretty easy to built, read, and modify script with framework like this: AdlibRegister("_Terminate", 1000*60*60*3) ;3 Hours AdlibRegister("_KeepAlive", 1000*30) ;30 Seconds While 1 Sleep(10) WEnd Func _Terminate() Exit EndFunc Func _KeepAlive() ;If WinExists or If ProcessExists Then ;ControlClick() ;Else ;_Terminate() ;EndIf EndFunc
    1 point
  21. Thank you, Mr. VIP. And thanks for the other feedback. Improving performance In relation to code optimization, it's interesting to know how much time is spent on the various steps that need to be performed to execute the code. How long does it take to load compiled code? How long does it take to pass arrays back and forth between AutoIt code and compiled code? And how long does it take to execute the actual compiled code? It's also interesting to know how much memory is used. How much memory is used to load the code? How much memory is used while executing the code? FATfld.7z below contains a folder named FATfld to test such things (when this folder was created I think FATfld was an abbreviation for "Fast Array Test folder" or something like that). It's placed just below FAMproj. If you've downloaded and unzipped the previous 7z-files the FAMproj folder should look like this: FAMproj\ Display\ FAMudf\ FASudf\ FATfld\ FGAudf\ The code in FATfld\ is depending on the code in all other folders. But the other folders are not depending on FATfld\. You can install/delete FATfld\ at any time. Most of the questions above are tested in Runtimes\. I don't want to review all tests. You can do it yourself if you are interested. I'll focus on a few of the tests. Passing arrays Includes\Method.au3 and Includes\VBcode.au3 contains code that's used to measure the time it takes to pass arrays back and forth between AutoIt code / method code and AutoIt code / VB code. Includes\Method.au3: #include-once #include "..\..\FAMudf\AccArrays\AccArrays.au3" Global $hTimerMethod, $fPassedToMethod, $fReturnedFromMethod Func PassToFromMethod( $aArray ) $hTimerMethod = TimerInit() AccArrays01( PassToFromMethodMtd, $aArray ) $fReturnedFromMethod = TimerDiff( $hTimerMethod ) EndFunc Func PassToFromMethodMtd( $pvArray ) $fPassedToMethod = TimerDiff( $hTimerMethod ) #forceref $pvArray EndFunc Func RunMethod( $aArray ) AccArrays01( RunMethodMtd, $aArray ) EndFunc Func RunMethodMtd( $pvArray ) MsgBox( 0, "Open Task Manager", "Check memory usage" ) #forceref $pvArray EndFunc Includes\VBcode.au3: #include-once #include "Functions\Initialization.au3" Func FAT_FromAutoItToVBcode( $aArray ) If Not FAT_PassArrayInitVbSrc( "IsFAT_PassArrayInitVbSrc" ) Then Return SetError(4,0,0) Local $oPassArrayClass = FAT_PassArrayInit() If Not IsObj( $oPassArrayClass ) Then Return SetError(5,0,0) $oPassArrayClass.FromAutoIt( $aArray ) EndFunc Func FAT_FromVBcodeToAutoIt( ByRef $aArray ) If Not FAT_PassArrayInitVbSrc( "IsFAT_PassArrayInitVbSrc" ) Then Return SetError(4,0,0) Local $oPassArrayClass = FAT_PassArrayInit() If Not IsObj( $oPassArrayClass ) Then Return SetError(5,0,0) $aArray = $oPassArrayClass.ToAutoIt() EndFunc Func FAT_RunVBcode( $aArray ) If Not FAT_PassArrayInitVbSrc( "IsFAT_PassArrayInitVbSrc" ) Then Return SetError(4,0,0) Local $oPassArrayClass = FAT_PassArrayInit() If Not IsObj( $oPassArrayClass ) Then Return SetError(5,0,0) $oPassArrayClass.RunVBcode( $aArray ) EndFunc Sources\PassArray.vb: Imports System.Windows.Forms Class PassArrayClass 'aObjects ~ aArray Dim aObjects As Object(,) Public Sub FromAutoIt( aObjectsIn As Object(,) ) aObjects = aObjectsIn End Sub Public Function ToAutoIt() As Object(,) Return aObjects End Function Public Sub RunVBcode( aObjectsIn As Object(,) ) MessageBox.Show( "Check memory usage", "Open Task Manager" ) End Sub End Class Tests for a varying number of rows is performed with "Runtimes\Pass arrays\Pass arrays.au3". These are the results: Code executed as 32 bit code Code executed as 64 bit code ============================ ============================ 50,000 rows, 6 columns, 2 str cols 50,000 rows, 6 columns, 2 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 117.7597 From AutoIt to method: 85.9069 From method to AutoIt: 59.0443 From method to AutoIt: 46.8230 Total time: 176.8040 Total time: 132.7299 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 164.0283 From AutoIt to VB code: 144.0661 From VB code to AutoIt: 57.1975 From VB code to AutoIt: 44.9665 Total time: 221.2258 Total time: 189.0325 50,000 rows, 6 columns, 0 str cols 50,000 rows, 6 columns, 0 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 47.3782 From AutoIt to method: 40.2639 From method to AutoIt: 22.7405 From method to AutoIt: 22.2371 Total time: 70.1186 Total time: 62.5010 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 77.6208 From AutoIt to VB code: 61.7502 From VB code to AutoIt: 34.7429 From VB code to AutoIt: 29.7381 Total time: 112.3637 Total time: 91.4883 100,000 rows, 6 columns, 2 str cols 100,000 rows, 6 columns, 2 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 236.3509 From AutoIt to method: 173.5922 From method to AutoIt: 119.5647 From method to AutoIt: 92.3186 Total time: 355.9155 Total time: 265.9108 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 332.0638 From AutoIt to VB code: 246.2865 From VB code to AutoIt: 114.8042 From VB code to AutoIt: 92.1593 Total time: 446.8680 Total time: 338.4458 100,000 rows, 6 columns, 0 str cols 100,000 rows, 6 columns, 0 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 95.8640 From AutoIt to method: 71.1650 From method to AutoIt: 46.2088 From method to AutoIt: 41.2588 Total time: 142.0727 Total time: 112.4238 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 174.9777 From AutoIt to VB code: 214.5529 From VB code to AutoIt: 63.5418 From VB code to AutoIt: 53.0166 Total time: 238.5196 Total time: 267.5695 250,000 rows, 6 columns, 2 str cols 250,000 rows, 6 columns, 2 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 600.8753 From AutoIt to method: 438.1211 From method to AutoIt: 300.9965 From method to AutoIt: 237.2756 Total time: 901.8717 Total time: 675.3968 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 860.9385 From AutoIt to VB code: 943.8392 From VB code to AutoIt: 290.0850 From VB code to AutoIt: 234.5046 Total time: 1151.0235 Total time: 1178.3438 250,000 rows, 6 columns, 0 str cols 250,000 rows, 6 columns, 0 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 240.3400 From AutoIt to method: 178.3870 From method to AutoIt: 114.4742 From method to AutoIt: 103.9808 Total time: 354.8143 Total time: 282.3679 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 478.6563 From AutoIt to VB code: 368.4721 From VB code to AutoIt: 161.0129 From VB code to AutoIt: 134.6160 Total time: 639.6692 Total time: 503.0881 500,000 rows, 6 columns, 2 str cols 500,000 rows, 6 columns, 2 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 1213.4915 From AutoIt to method: 872.8612 From method to AutoIt: 602.7456 From method to AutoIt: 483.1377 Total time: 1816.2372 Total time: 1355.9989 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 1829.4514 From AutoIt to VB code: 1324.2018 From VB code to AutoIt: 583.9586 From VB code to AutoIt: 462.1512 Total time: 2413.4100 Total time: 1786.3531 500,000 rows, 6 columns, 0 str cols 500,000 rows, 6 columns, 0 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 480.8723 From AutoIt to method: 360.1075 From method to AutoIt: 231.7580 From method to AutoIt: 206.3836 Total time: 712.6303 Total time: 566.4911 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 937.9331 From AutoIt to VB code: 769.3023 From VB code to AutoIt: 323.9392 From VB code to AutoIt: 270.0216 Total time: 1261.8723 Total time: 1039.3239 750,000 rows, 6 columns, 2 str cols 750,000 rows, 6 columns, 2 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 1814.8179 From AutoIt to method: 1329.9400 From method to AutoIt: 910.3338 From method to AutoIt: 736.7954 Total time: 2725.1517 Total time: 2066.7354 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 2819.8451 From AutoIt to VB code: 2192.5480 From VB code to AutoIt: 878.5583 From VB code to AutoIt: 711.1307 Total time: 3698.4035 Total time: 2903.6786 750,000 rows, 6 columns, 0 str cols 750,000 rows, 6 columns, 0 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 725.8141 From AutoIt to method: 538.6317 From method to AutoIt: 346.2186 From method to AutoIt: 312.2894 Total time: 1072.0327 Total time: 850.9211 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 1431.7707 From AutoIt to VB code: 979.0254 From VB code to AutoIt: 481.3245 From VB code to AutoIt: 413.5206 Total time: 1913.0952 Total time: 1392.5460 1,000,000 rows, 6 columns, 2 str cols 1,000,000 rows, 6 columns, 2 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 2398.6548 From AutoIt to method: 1780.2107 From method to AutoIt: 1214.6058 From method to AutoIt: 984.2918 Total time: 3613.2606 Total time: 2764.5024 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 3790.6409 From AutoIt to VB code: 3001.6664 From VB code to AutoIt: 1167.6269 From VB code to AutoIt: 939.0294 Total time: 4958.2678 Total time: 3940.6958 1,000,000 rows, 6 columns, 0 str cols 1,000,000 rows, 6 columns, 0 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 958.5246 From AutoIt to method: 720.1056 From method to AutoIt: 457.4911 From method to AutoIt: 416.1151 Total time: 1416.0156 Total time: 1136.2207 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 1916.9292 From AutoIt to VB code: 2074.5791 From VB code to AutoIt: 644.4524 From VB code to AutoIt: 549.9856 Total time: 2561.3816 Total time: 2624.5647 2,000,000 rows, 6 columns, 2 str cols 2,000,000 rows, 6 columns, 2 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 4901.1622 From AutoIt to method: 3645.8892 From method to AutoIt: 2470.5576 From method to AutoIt: 1972.5093 Total time: 7371.7199 Total time: 5618.3984 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 8066.7966 From AutoIt to VB code: 6371.5138 From VB code to AutoIt: 2347.8576 From VB code to AutoIt: 1886.6691 Total time: 10414.6542 Total time: 8258.1829 2,000,000 rows, 6 columns, 0 str cols 2,000,000 rows, 6 columns, 0 str cols Pass array to/from method/VB code Pass array to/from method/VB code ----------------------------------------- ----------------------------------------- From AutoIt to method: 1940.5748 From AutoIt to method: 1443.4808 From method to AutoIt: 924.8848 From method to AutoIt: 836.6967 Total time: 2865.4596 Total time: 2280.1776 ----------------------------------------- ----------------------------------------- From AutoIt to VB code: 4407.3205 From AutoIt to VB code: 4503.7527 From VB code to AutoIt: 1294.5233 From VB code to AutoIt: 1111.8894 Total time: 5701.8438 Total time: 5615.6421 Most of the time is spent on internal AutoIt COM conversions discussed in details in Accessing AutoIt Variables. For the VB code there is also spent time on converting AutoIt variants to VB objects and vice versa (default marshaling). From the results you can see that there is a slow and a fast direction for passing arrays. Passing arrays from AutoIt to method/VB code is the slow direction. Passing arrays from method/VB code to AutoIt is the fast direction. The fast direction is about twice as fast as the slow direction. Because of variant/object conversions it takes much longer time to pass arrays to/from VB code than to/from method code (AutoIt method code). It takes much longer time to pass arrays of strings than arrays of numbers. For a large number of rows in can take really long time to pass arrays. Runtime measurements In Fast General Array Management Functions UDF the performance for inserting a single row in arrays with/without strings is testet for a varying number of rows. The measured time includes passing arrays. The results are not impressive. The compiled code is at best 2/4 times faster than pure AutoIt code for arrays with/without strings. A new test is performed here that does not include the time it takes to pass arrays. Now the results looks much better (previous results to the left, new results to the right). Runtimes\FAT_RowsInsert.au3: Time for passing arrays to/from method included Time for passing arrays to/from method NOT included =============================================== =================================================== Code executed as 32 bit code Code executed as 64 bit code Code executed as 32 bit code Code executed as 64 bit code ============================ ============================ ============================ ============================ 100 rows, 6 columns 100 rows, 6 columns 100 rows, 6 columns 100 rows, 6 columns Insert one row at index 25 Insert one row at index 25 Insert one row at index 25 Insert one row at index 25 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 0.7159 _ArrayInsert: 0.6087 _ArrayInsert: 0.7186 _ArrayInsert: 0.6222 FGA_RowsInsert: 2.6422 FGA_RowsInsert: 3.0201 FAT_RowsInsert: 0.8716 FAT_RowsInsert: 0.7009 500 rows, 6 columns 500 rows, 6 columns 500 rows, 6 columns 500 rows, 6 columns Insert one row at index 125 Insert one row at index 125 Insert one row at index 125 Insert one row at index 125 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 6.7059 _ArrayInsert: 13.4817 _ArrayInsert: 14.8413 _ArrayInsert: 6.5049 FGA_RowsInsert: 3.5246 FGA_RowsInsert: 6.3012 FAT_RowsInsert: 1.0256 FAT_RowsInsert: 0.3635 1,000 rows, 6 columns 1,000 rows, 6 columns 1,000 rows, 6 columns 1,000 rows, 6 columns Insert one row at index 250 Insert one row at index 250 Insert one row at index 250 Insert one row at index 250 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 11.9255 _ArrayInsert: 10.2926 _ArrayInsert: 12.8272 _ArrayInsert: 10.8095 FGA_RowsInsert: 3.6268 FGA_RowsInsert: 5.0115 FAT_RowsInsert: 0.6145 FAT_RowsInsert: 0.7765 2,000 rows, 6 columns 2,000 rows, 6 columns 2,000 rows, 6 columns 2,000 rows, 6 columns Insert one row at index 500 Insert one row at index 500 Insert one row at index 500 Insert one row at index 500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 14.6414 _ArrayInsert: 10.9816 _ArrayInsert: 12.9538 _ArrayInsert: 13.9317 FGA_RowsInsert: 8.5630 FGA_RowsInsert: 5.3611 FAT_RowsInsert: 0.4499 FAT_RowsInsert: 0.3247 5,000 rows, 6 columns 5,000 rows, 6 columns 5,000 rows, 6 columns 5,000 rows, 6 columns Insert one row at index 1,250 Insert one row at index 1,250 Insert one row at index 1,250 Insert one row at index 1,250 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 32.8972 _ArrayInsert: 28.7703 _ArrayInsert: 35.2970 _ArrayInsert: 27.7061 FGA_RowsInsert: 18.5431 FGA_RowsInsert: 14.3076 FAT_RowsInsert: 1.0231 FAT_RowsInsert: 0.5571 10,000 rows, 6 columns 10,000 rows, 6 columns 10,000 rows, 6 columns 10,000 rows, 6 columns Insert one row at index 2,500 Insert one row at index 2,500 Insert one row at index 2,500 Insert one row at index 2,500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 65.9608 _ArrayInsert: 56.4863 _ArrayInsert: 66.7517 _ArrayInsert: 59.8562 FGA_RowsInsert: 37.4105 FGA_RowsInsert: 29.5826 FAT_RowsInsert: 1.5897 FAT_RowsInsert: 1.0431 20,000 rows, 6 columns 20,000 rows, 6 columns 20,000 rows, 6 columns 20,000 rows, 6 columns Insert one row at index 5,000 Insert one row at index 5,000 Insert one row at index 5,000 Insert one row at index 5,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 134.4746 _ArrayInsert: 115.3622 _ArrayInsert: 132.1033 _ArrayInsert: 110.1108 FGA_RowsInsert: 74.8673 FGA_RowsInsert: 55.7314 FAT_RowsInsert: 2.9804 FAT_RowsInsert: 1.8265 50,000 rows, 6 columns 50,000 rows, 6 columns 50,000 rows, 6 columns 50,000 rows, 6 columns Insert one row at index 12,500 Insert one row at index 12,500 Insert one row at index 12,500 Insert one row at index 12,500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 328.4011 _ArrayInsert: 283.3676 _ArrayInsert: 328.3556 _ArrayInsert: 287.0136 FGA_RowsInsert: 187.4815 FGA_RowsInsert: 138.7198 FAT_RowsInsert: 7.2069 FAT_RowsInsert: 4.3575 100,000 rows, 6 columns 100,000 rows, 6 columns 100,000 rows, 6 columns 100,000 rows, 6 columns Insert one row at index 25,000 Insert one row at index 25,000 Insert one row at index 25,000 Insert one row at index 25,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 636.1870 _ArrayInsert: 560.0946 _ArrayInsert: 647.2785 _ArrayInsert: 539.8483 FGA_RowsInsert: 374.8816 FGA_RowsInsert: 278.7284 FAT_RowsInsert: 14.2110 FAT_RowsInsert: 8.4874 250,000 rows, 6 columns 250,000 rows, 6 columns 250,000 rows, 6 columns 250,000 rows, 6 columns Insert one row at index 62,500 Insert one row at index 62,500 Insert one row at index 62,500 Insert one row at index 62,500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 1619.4215 _ArrayInsert: 1389.8712 _ArrayInsert: 1638.6130 _ArrayInsert: 1390.4849 FGA_RowsInsert: 926.4933 FGA_RowsInsert: 693.0172 FAT_RowsInsert: 35.0150 FAT_RowsInsert: 20.7480 500,000 rows, 6 columns 500,000 rows, 6 columns 500,000 rows, 6 columns 500,000 rows, 6 columns Insert one row at index 125,000 Insert one row at index 125,000 Insert one row at index 125,000 Insert one row at index 125,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 3218.2437 _ArrayInsert: 2823.3835 _ArrayInsert: 3306.2819 _ArrayInsert: 2746.6192 FGA_RowsInsert: 1857.2046 FGA_RowsInsert: 1411.2169 FAT_RowsInsert: 70.0829 FAT_RowsInsert: 40.7386 750,000 rows, 6 columns 750,000 rows, 6 columns 750,000 rows, 6 columns 750,000 rows, 6 columns Insert one row at index 187,500 Insert one row at index 187,500 Insert one row at index 187,500 Insert one row at index 187,500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 4816.4340 _ArrayInsert: 4111.5426 _ArrayInsert: 4967.1980 _ArrayInsert: 4151.5911 FGA_RowsInsert: 2803.2133 FGA_RowsInsert: 2070.2246 FAT_RowsInsert: 105.4979 FAT_RowsInsert: 61.0131 1,000,000 rows, 6 columns 1,000,000 rows, 6 columns 1,000,000 rows, 6 columns 1,000,000 rows, 6 columns Insert one row at index 250,000 Insert one row at index 250,000 Insert one row at index 250,000 Insert one row at index 250,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 6483.6767 _ArrayInsert: 5592.3917 _ArrayInsert: 6513.4886 _ArrayInsert: 5427.5685 FGA_RowsInsert: 3754.6153 FGA_RowsInsert: 2764.8844 FAT_RowsInsert: 139.1285 FAT_RowsInsert: 81.1930 2,000,000 rows, 6 columns 2,000,000 rows, 6 columns 2,000,000 rows, 6 columns 2,000,000 rows, 6 columns Insert one row at index 500,000 Insert one row at index 500,000 Insert one row at index 500,000 Insert one row at index 500,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 12841.9769 _ArrayInsert: 11450.4454 _ArrayInsert: 13193.6124 _ArrayInsert: 10787.2675 FGA_RowsInsert: 7481.8667 FGA_RowsInsert: 5691.6660 FAT_RowsInsert: 279.8582 FAT_RowsInsert: 164.2681 Runtimes\FAT_RowsInsert-Numbers.au3: Time for passing arrays to/from method included Time for passing arrays to/from method NOT included =============================================== =================================================== Code executed as 32 bit code Code executed as 64 bit code Code executed as 32 bit code Code executed as 64 bit code ============================ ============================ ============================ ============================ 100 rows, 6 columns 100 rows, 6 columns 100 rows, 6 columns 100 rows, 6 columns Insert one row at index 25 Insert one row at index 25 Insert one row at index 25 Insert one row at index 25 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 1.2827 _ArrayInsert: 2.7468 _ArrayInsert: 0.8009 _ArrayInsert: 0.6125 FGA_RowsInsert: 1.5758 FGA_RowsInsert: 2.3249 FAT_RowsInsert: 0.7200 FAT_RowsInsert: 1.0547 500 rows, 6 columns 500 rows, 6 columns 500 rows, 6 columns 500 rows, 6 columns Insert one row at index 125 Insert one row at index 125 Insert one row at index 125 Insert one row at index 125 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 15.0842 _ArrayInsert: 14.2354 _ArrayInsert: 15.4898 _ArrayInsert: 15.3618 FGA_RowsInsert: 3.9896 FGA_RowsInsert: 3.2785 FAT_RowsInsert: 0.7968 FAT_RowsInsert: 0.6940 1,000 rows, 6 columns 1,000 rows, 6 columns 1,000 rows, 6 columns 1,000 rows, 6 columns Insert one row at index 250 Insert one row at index 250 Insert one row at index 250 Insert one row at index 250 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 14.3390 _ArrayInsert: 13.2319 _ArrayInsert: 12.7557 _ArrayInsert: 11.9728 FGA_RowsInsert: 2.7953 FGA_RowsInsert: 2.1401 FAT_RowsInsert: 0.4056 FAT_RowsInsert: 0.3028 2,000 rows, 6 columns 2,000 rows, 6 columns 2,000 rows, 6 columns 2,000 rows, 6 columns Insert one row at index 500 Insert one row at index 500 Insert one row at index 500 Insert one row at index 500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 13.5841 _ArrayInsert: 14.7590 _ArrayInsert: 14.5545 _ArrayInsert: 16.2899 FGA_RowsInsert: 3.1203 FGA_RowsInsert: 2.2363 FAT_RowsInsert: 0.2507 FAT_RowsInsert: 0.2028 5,000 rows, 6 columns 5,000 rows, 6 columns 5,000 rows, 6 columns 5,000 rows, 6 columns Insert one row at index 1,250 Insert one row at index 1,250 Insert one row at index 1,250 Insert one row at index 1,250 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 30.6353 _ArrayInsert: 26.0359 _ArrayInsert: 30.8904 _ArrayInsert: 26.1819 FGA_RowsInsert: 7.4227 FGA_RowsInsert: 5.7619 FAT_RowsInsert: 0.3818 FAT_RowsInsert: 0.2654 10,000 rows, 6 columns 10,000 rows, 6 columns 10,000 rows, 6 columns 10,000 rows, 6 columns Insert one row at index 2,500 Insert one row at index 2,500 Insert one row at index 2,500 Insert one row at index 2,500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 62.1590 _ArrayInsert: 56.1475 _ArrayInsert: 61.9371 _ArrayInsert: 53.3951 FGA_RowsInsert: 15.6602 FGA_RowsInsert: 13.0668 FAT_RowsInsert: 0.6300 FAT_RowsInsert: 0.4133 20,000 rows, 6 columns 20,000 rows, 6 columns 20,000 rows, 6 columns 20,000 rows, 6 columns Insert one row at index 5,000 Insert one row at index 5,000 Insert one row at index 5,000 Insert one row at index 5,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 123.7628 _ArrayInsert: 110.9456 _ArrayInsert: 124.0359 _ArrayInsert: 107.2285 FGA_RowsInsert: 31.2173 FGA_RowsInsert: 23.0951 FAT_RowsInsert: 1.0780 FAT_RowsInsert: 0.6582 50,000 rows, 6 columns 50,000 rows, 6 columns 50,000 rows, 6 columns 50,000 rows, 6 columns Insert one row at index 12,500 Insert one row at index 12,500 Insert one row at index 12,500 Insert one row at index 12,500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 311.6687 _ArrayInsert: 268.6157 _ArrayInsert: 313.8828 _ArrayInsert: 269.0698 FGA_RowsInsert: 74.9177 FGA_RowsInsert: 67.6460 FAT_RowsInsert: 2.3352 FAT_RowsInsert: 1.3846 100,000 rows, 6 columns 100,000 rows, 6 columns 100,000 rows, 6 columns 100,000 rows, 6 columns Insert one row at index 25,000 Insert one row at index 25,000 Insert one row at index 25,000 Insert one row at index 25,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 608.1551 _ArrayInsert: 517.9057 _ArrayInsert: 613.7654 _ArrayInsert: 527.6046 FGA_RowsInsert: 150.9420 FGA_RowsInsert: 120.8896 FAT_RowsInsert: 4.5030 FAT_RowsInsert: 2.5776 250,000 rows, 6 columns 250,000 rows, 6 columns 250,000 rows, 6 columns 250,000 rows, 6 columns Insert one row at index 62,500 Insert one row at index 62,500 Insert one row at index 62,500 Insert one row at index 62,500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 1515.0866 _ArrayInsert: 1318.7368 _ArrayInsert: 1521.3272 _ArrayInsert: 1293.1201 FGA_RowsInsert: 380.4741 FGA_RowsInsert: 306.2980 FAT_RowsInsert: 10.9104 FAT_RowsInsert: 6.0059 500,000 rows, 6 columns 500,000 rows, 6 columns 500,000 rows, 6 columns 500,000 rows, 6 columns Insert one row at index 125,000 Insert one row at index 125,000 Insert one row at index 125,000 Insert one row at index 125,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 3055.9588 _ArrayInsert: 2592.6736 _ArrayInsert: 3053.3713 _ArrayInsert: 2663.5527 FGA_RowsInsert: 739.0425 FGA_RowsInsert: 603.7840 FAT_RowsInsert: 21.6550 FAT_RowsInsert: 11.9886 750,000 rows, 6 columns 750,000 rows, 6 columns 750,000 rows, 6 columns 750,000 rows, 6 columns Insert one row at index 187,500 Insert one row at index 187,500 Insert one row at index 187,500 Insert one row at index 187,500 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 4579.8788 _ArrayInsert: 3906.9467 _ArrayInsert: 4594.4156 _ArrayInsert: 3866.0774 FGA_RowsInsert: 1138.3392 FGA_RowsInsert: 912.8767 FAT_RowsInsert: 32.3634 FAT_RowsInsert: 17.6097 1,000,000 rows, 6 columns 1,000,000 rows, 6 columns 1,000,000 rows, 6 columns 1,000,000 rows, 6 columns Insert one row at index 250,000 Insert one row at index 250,000 Insert one row at index 250,000 Insert one row at index 250,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 6158.5664 _ArrayInsert: 5282.8649 _ArrayInsert: 6060.0125 _ArrayInsert: 5241.2667 FGA_RowsInsert: 1550.3611 FGA_RowsInsert: 1206.8620 FAT_RowsInsert: 42.9751 FAT_RowsInsert: 23.5342 2,000,000 rows, 6 columns 2,000,000 rows, 6 columns 2,000,000 rows, 6 columns 2,000,000 rows, 6 columns Insert one row at index 500,000 Insert one row at index 500,000 Insert one row at index 500,000 Insert one row at index 500,000 ------------------------------- ------------------------------- ------------------------------- ------------------------------- _ArrayInsert: 12131.6853 _ArrayInsert: 10471.6424 _ArrayInsert: 12181.9698 _ArrayInsert: 10259.6884 FGA_RowsInsert: 2976.3306 FGA_RowsInsert: 2425.4074 FAT_RowsInsert: 85.6680 FAT_RowsInsert: 47.1634 Especially 64 bit code is fast. Compiled code is 60 - 70 times faster than pure AutoIt code for arrays with strings. At best 200 times faster for arrays without strings. Cause of poor results The main reason that it's not possible to get better results when it comes to simple array operations (eg. moving elements around in an array without doing actual calculations) is that the time saved by using compiled code is spent on passing arrays. Particularly passing arrays between AutoIt code and VB code takes a long time. To get better results it must be avoided to pass arrays back and forth between AutoIt code and compiled code. What can be done? Is it possible to avoid the time used to pass arrays, and thereby achieve much better performance? Yes. This is possible by replacing native AutoIt arrays with pure safearrays and do all array operations directly on the safearrays. Inside the method code (the UI Automation object methods which are replaced with AutoIt methods) the arrays are safearrays anyway. The safearrays are already passed to compiled C++ code by reference as pointers. The step to avoid native AutoIt arrays is a small step. Of course the arrays can at any time be converted back and forth between AutoIt arrays and safearrays. But these conversions can take a long time. To make the code really fast all array operations must be done on safearrays. Replacing native AutoIt arrays with pure safearrays isn't possible in .NET and VB code. In new versions of these UDFs all .NET and VB code (all managed code) will be removed and replaced by AutoIt code and C++ code (unmanaged code). AutoIt code is used to handle safearrays. C++ code is used to optimize central loops crucial to performance. New functions will be implemented to handle safearrays directly. It's probably also necessary to implement some more safearray functions. And it's necessary to implement a display function to display data in a virtual listview directly from a safearray source. End goal The end goal is to implement functions that can take both an $aArray (native AutoIt array) and a $pArray (pointer to safearray) as parameters. More or less in the same way as the functions in the GUICtrl UDFs can take both a native AutoIt controlID and a Windows control handle as parameters. In first place, it'll probably be 2 groups of functions. FATfld.7z
    1 point
  22. ISI360

    ISN AutoIt Studio

    Yeah the ISN would definitely benefit from tutorial videos, but as a "one man show" i don´t have the time to make such videos. (And you really don´t want to hear me speaking english ) But if anyone is interessted to make such videos, i will support them as good as i can. And about extracode: Yeah it´s different here in the ISN than Visual Studio. Extracode means only "add you own au3 code to (below) the control). You can see it in the "generate au3 code" window in the form studio how it´s managed. And as a Tipp: You do not need to copy past the gui code from the formstudio to your script. Simply include the .isf file as an include! (see testproject)
    1 point
  23. Thank You Very Much You Just Saved My Life I Have Signed Up To Say Thank You But I Think I Love Autoit So I will use my account to.
    1 point
  24. Running them is fine, you just need the path to the executables $firefox = "x:\path\to\firefox.exe" Run($firefox) Just put all the app paths you want to run in a file of some sort like ini or txt. Go through them in a loop running them, while you have a coffee.
    1 point
×
×
  • Create New...