Leaderboard
Popular Content
Showing content with the highest reputation on 11/05/2024 in all areas
-
BETA: SciTE v5x & lua Dynamic_include and "Smart" AutoComplete for Vars/UDFs/Abbrevs
donnyh13 and one other reacted to argumentum for a topic
Tested both x86 and x64. All good. (24H2 26100.1000)2 points -
_FileListToArray issue
mr-es335 and one other reacted to pixelsearch for a topic
@ioa747 i think there's a possible issue in your last script, if the user selects only 1 wav file, then : Local $sFileOpenDialog = FileOpenDialog(...) Local $aWavFiles = StringSplit($sFileOpenDialog, "|") Local $sWavFolder = $aWavFiles[1] $sWavFolder is not an "only path" in this case, but a path + filename This is because FileOpenDialog treats differently its return : when the user selects only one file, then StringSplit acts like the following (as no delimiter is found and StringSplit flag is not equal to $STR_NOCOUNT) : Row 0 : 1 Row 1 : Path & Filename ...compared to a user who selects at least 2 files, then a delimiter (|) is always found in the returned string and StringSplit will act like this when 2 files are selected : Row 0 : 3 Row 1 : Path Row 2 : Filename #1 Row 3 : Filename #2 A possible solution could be to treat both cases in the same way, i.e. always have the "path only" in row 1 : Local $sFileOpenDialog = FileOpenDialog(...) Local $aWavFiles = StringSplit($sFileOpenDialog, "|") If $aWavFiles[0] = 1 Then ; only 1 file was selected by user Local $iPos_LastBackslash = StringInStr($aWavFiles[1], "\", 0, -1) ; -1 starts from the right (+++) ReDim $aWavFiles[3] $aWavFiles[2] = StringMid($aWavFiles[1], $iPos_LastBackslash + 1) ; file name $aWavFiles[1] = StringLeft($aWavFiles[1], $iPos_LastBackslash - 1) ; path (without last backslash) $aWavFiles[0] = 2 EndIf Local $sWavFolder = $aWavFiles[1] ; now it always works, no matter the user selected 1 or several files For $i = 2 To $aWavFiles[0] ; as found in your script, no change needed. ...2 points -
Radio Buttons - Not working as expected
argumentum reacted to Trinnon for a topic
Yeh. I gave up on the variables. Some mentioned that AutoIt could not access the COM object for the SCCM Environment. -COMObject Microsoft.SMS.TSEnvironment As long as the front end looks pretty, I will code around what it cannot do. 😊1 point -
Nah, that's a Merge failure from my site. I move the lot from an SVN to a Github setup to be able to easier merge the new releases into my version, and missed the updated ico file. Should be fixed in the current zips available. Thanks for letting me know.1 point
-
Radio Buttons - Not working as expected
argumentum reacted to Trinnon for a topic
I just need to create the file and then I have a PowerShell script that picks them up and creates variables for SCCM Task Sequences. I could not find a way for AutoIt to create variables so just leaving some breadcrumbs. Kinda sucks but I want to get rid of my current full PowerShell GUI because it is a pain dealing with manually coding the GUI for multiple resolutions.1 point -
None On my OFFICE DELL works well Wersja Windows 11 Pro Wersja 23H2 Zainstalowano dnia ‎22.‎12.‎2022 Kompilacja systemu operacyjnego 22631.4391 Możliwości Windows Feature Experience Pack 1000.22700.1047.0 I'll be able to check my home notebook this evening. I'll be able to check this evening.1 point
-
Do you mean that all the text in the input field is selected (focused) when you click on it, so that it is highlighted in black/blue on your image?1 point
-
it is not mine, it belongs to the UWPOCR function , simply because it passes directly to the function I have added the relevant parameters. I don't remember I have to look it up1 point
-
Absolute legend, the update works perfectly on all the test images. I diffed the change you made and would never have even thought to make it. Come to think of it, how most of this program works is way over my head and I tip my hat off to the geniuses that contributed to it. As you wish, I have now made a donation to Jonathan Bennett as per the AutoIT donation link.1 point
-
OCR from a small area
argumentum reacted to ioa747 for a topic
I'm glad I helped, and I had a good time If you feel generous, you can make a donation to https://www.autoitscript.com/site/donate/1 point -
1 point
-
this is for small numbers like I simplified the process as much as possible by removing the unnecessary stuff like the area selector. ; https://www.autoitscript.com/forum/topic/211521-ocr-from-a-small-area/?do=findComment&comment=1538057 ; Version: 4.0 #include <GDIPlus.au3> #include <Array.au3> #include <File.au3> Local $Result = _GetNumber(@ScriptDir & "\100num\152.png") MsgBox($MB_SYSTEMMODAL, "_GetNumber", $Result) ;~ Test(@ScriptDir & "\100num") ;-------------------------------------------------------------------------------------------------------------------------------- Func _GetNumber($sFileName, $hColor = 0x00FF00) ; Main Program ; Capture the color map for the specified area Local $aColorMap = CaptureAreaColorMap($sFileName) ;~ _ArrayDisplay($aColorMap) Local $Result = FindNumberUsingColorMap($aColorMap, $hColor) ;~ MsgBox($MB_SYSTEMMODAL, "$Result", $Result) Return $Result EndFunc ;==>_GetNumber ;-------------------------------------------------------------------------------------------------------------------------------- Func CaptureAreaColorMap($sFileName) ; create color map array ; Initialize GDI+ to work with bitmaps _GDIPlus_Startup() ; Capture the screen area as a bitmap Local $hBitmap = _GDIPlus_BitmapCreateFromFile($sFileName) ; Get the width and height of the captured area Local $width = _GDIPlus_ImageGetWidth($hBitmap) Local $height = _GDIPlus_ImageGetHeight($hBitmap) ;~ ConsoleWrite("Image: $width=" & $width & ", $height=" & $height & @CRLF) ; Create an array to store color values Local $aColorMap[$width][$height] ; Loop through each pixel in the bitmap and retrieve its color For $y = 0 To $height - 1 For $x = 0 To $width - 1 ; Get the pixel color from the bitmap in ARGB format Local $argbColor = _GDIPlus_BitmapGetPixel($hBitmap, $x, $y) ; Convert ARGB to BGR for comparison (ignore the alpha channel) Local $bgrColor = BitAND($argbColor, 0x00FFFFFF) $aColorMap[$x][$y] = $bgrColor Next Next ; Cleanup resources _GDIPlus_BitmapDispose($hBitmap) _GDIPlus_Shutdown() Return $aColorMap EndFunc ;==>CaptureAreaColorMap ;-------------------------------------------------------------------------------------------------------------------------------- Func FindNumberUsingColorMap($aColorMap, $hColor = 0x00FF00) ; find number in color map array Local $width = UBound($aColorMap, 1) Local $height = UBound($aColorMap, 2) Local $firstRow = -1, $lastRow = -1, $firstCol = -1, $lastCol = -1 ; Scan for the first and last rows and columns with $hColor pixels For $y = 0 To $height - 1 For $x = 0 To $width - 1 If $aColorMap[$x][$y] = $hColor Then If $firstRow = -1 Then $firstRow = $y $lastRow = $y If $firstCol = -1 Or $x < $firstCol Then $firstCol = $x If $lastCol = -1 Or $x > $lastCol Then $lastCol = $x EndIf Next Next If $firstRow = -1 Or $lastRow = -1 Or $firstCol = -1 Or $lastCol = -1 Then MsgBox($MB_SYSTEMMODAL, "LineNumber:" & @ScriptLineNumber, "No color found" & @TAB & @TAB) Exit EndIf ; each number Display is a matrix of 14x20 pixels Local $numberWidth = 14 ; set number width per digit Local $numberSpace = 2 ; set Space between digits Local $Empty = 0, $Corection = 0 ; Corection for boundaries if 1st digit = 1 For $x = $firstCol To $lastCol - 1 If $aColorMap[$x][$firstRow] = 0x000000 Then $Empty += 1 If $Empty = 3 Then ;found 1st Space between digits $Corection = $firstCol - 1 - Abs($x - $numberWidth - $numberSpace) ExitLoop EndIf Else $Empty = 0 EndIf Next If $Corection > 0 Then $firstCol = $firstCol - $Corection Local $numberStart = $firstCol ;~ ConsoleWrite("$Corection=" & $Corection & @CRLF) ;~ ConsoleWrite("Display_boundaries firstRow:" & $firstRow & " lastRow:" & $lastRow & " firstCol:" & $firstCol & " lastCol:" & $lastCol & @CRLF) ;~ ConsoleWrite("" & @CRLF) Local $aNum[11][3] ; Define boundaries for each number position For $i = 1 To 10 $aNum[$i][0] = $numberStart $aNum[$i][1] = $numberStart + $numberWidth If $numberStart + $numberWidth + $numberSpace > $lastCol Then ExitLoop $numberStart += $numberWidth + $numberSpace $aNum[0][0] = $i + 1 Next Local $sNumber ; Generate patterns for each found number For $i = 1 To $aNum[0][0] Local $sPattern = "" For $y = $firstRow To $lastRow For $x = $aNum[$i][0] To $aNum[$i][1] - 1 If $aColorMap[$x][$y] = $hColor Then $sPattern &= "1" Else $sPattern &= "." EndIf Next $sPattern &= @CRLF Next $sNumber &= _GetPattern($sPattern) Next Return $sNumber EndFunc ;==>FindNumberUsingColorMap ;-------------------------------------------------------------------------------------------------------------------------------- Func _GetPattern($sPattern) ; patterns for each digit ;~ ConsoleWrite("**************" & @CRLF & $sPattern & @CRLF) Local $aNumber[10] ; Define simplified patterns for each digit $aNumber[0] = "" ; Pattern for '0' $aNumber[0] &= "...11.11.11..." & @CRLF $aNumber[0] &= "...11.11.11..." & @CRLF $aNumber[0] &= ".............." & @CRLF $aNumber[0] &= "11..........11" & @CRLF $aNumber[0] &= "11..........11" & @CRLF $aNumber[0] &= ".............." & @CRLF $aNumber[0] &= "11.......11.11" & @CRLF $aNumber[0] &= "11.......11.11" & @CRLF $aNumber[0] &= ".............." & @CRLF $aNumber[0] &= "11....11....11" & @CRLF $aNumber[0] &= "11....11....11" & @CRLF $aNumber[0] &= ".............." & @CRLF $aNumber[0] &= "11.11.......11" & @CRLF $aNumber[0] &= "11.11.......11" & @CRLF $aNumber[0] &= ".............." & @CRLF $aNumber[0] &= "11..........11" & @CRLF $aNumber[0] &= "11..........11" & @CRLF $aNumber[0] &= ".............." & @CRLF $aNumber[0] &= "...11.11.11..." & @CRLF $aNumber[0] &= "...11.11.11..." & @CRLF $aNumber[1] = "" ; Pattern for '1' $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= ".............." & @CRLF $aNumber[1] &= "...11.11......" & @CRLF $aNumber[1] &= "...11.11......" & @CRLF $aNumber[1] &= ".............." & @CRLF $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= ".............." & @CRLF $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= ".............." & @CRLF $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= ".............." & @CRLF $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= "......11......" & @CRLF $aNumber[1] &= ".............." & @CRLF $aNumber[1] &= "...11.11.11..." & @CRLF $aNumber[1] &= "...11.11.11..." & @CRLF $aNumber[2] = "" ; Pattern for '2' $aNumber[2] &= "...11.11.11..." & @CRLF $aNumber[2] &= "...11.11.11..." & @CRLF $aNumber[2] &= ".............." & @CRLF $aNumber[2] &= "11..........11" & @CRLF $aNumber[2] &= "11..........11" & @CRLF $aNumber[2] &= ".............." & @CRLF $aNumber[2] &= "............11" & @CRLF $aNumber[2] &= "............11" & @CRLF $aNumber[2] &= ".............." & @CRLF $aNumber[2] &= "......11.11..." & @CRLF $aNumber[2] &= "......11.11..." & @CRLF $aNumber[2] &= ".............." & @CRLF $aNumber[2] &= "...11........." & @CRLF $aNumber[2] &= "...11........." & @CRLF $aNumber[2] &= ".............." & @CRLF $aNumber[2] &= "11............" & @CRLF $aNumber[2] &= "11............" & @CRLF $aNumber[2] &= ".............." & @CRLF $aNumber[2] &= "11.11.11.11.11" & @CRLF $aNumber[2] &= "11.11.11.11.11" & @CRLF $aNumber[3] = "" ; Pattern for '3' $aNumber[3] &= "...11.11.11..." & @CRLF $aNumber[3] &= "...11.11.11..." & @CRLF $aNumber[3] &= ".............." & @CRLF $aNumber[3] &= "11..........11" & @CRLF $aNumber[3] &= "11..........11" & @CRLF $aNumber[3] &= ".............." & @CRLF $aNumber[3] &= "............11" & @CRLF $aNumber[3] &= "............11" & @CRLF $aNumber[3] &= ".............." & @CRLF $aNumber[3] &= "......11.11..." & @CRLF $aNumber[3] &= "......11.11..." & @CRLF $aNumber[3] &= ".............." & @CRLF $aNumber[3] &= "............11" & @CRLF $aNumber[3] &= "............11" & @CRLF $aNumber[3] &= ".............." & @CRLF $aNumber[3] &= "11..........11" & @CRLF $aNumber[3] &= "11..........11" & @CRLF $aNumber[3] &= ".............." & @CRLF $aNumber[3] &= "...11.11.11..." & @CRLF $aNumber[3] &= "...11.11.11..." & @CRLF $aNumber[4] = "" ; Pattern for '4' $aNumber[4] &= ".........11..." & @CRLF $aNumber[4] &= ".........11..." & @CRLF $aNumber[4] &= ".............." & @CRLF $aNumber[4] &= "......11.11..." & @CRLF $aNumber[4] &= "......11.11..." & @CRLF $aNumber[4] &= ".............." & @CRLF $aNumber[4] &= "...11....11..." & @CRLF $aNumber[4] &= "...11....11..." & @CRLF $aNumber[4] &= ".............." & @CRLF $aNumber[4] &= "11.......11..." & @CRLF $aNumber[4] &= "11.......11..." & @CRLF $aNumber[4] &= ".............." & @CRLF $aNumber[4] &= "11.11.11.11.11" & @CRLF $aNumber[4] &= "11.11.11.11.11" & @CRLF $aNumber[4] &= ".............." & @CRLF $aNumber[4] &= ".........11..." & @CRLF $aNumber[4] &= ".........11..." & @CRLF $aNumber[4] &= ".............." & @CRLF $aNumber[4] &= ".........11..." & @CRLF $aNumber[4] &= ".........11..." & @CRLF $aNumber[5] = "" ; Pattern for '5' $aNumber[5] &= "11.11.11.11.11" & @CRLF $aNumber[5] &= "11.11.11.11.11" & @CRLF $aNumber[5] &= ".............." & @CRLF $aNumber[5] &= "11............" & @CRLF $aNumber[5] &= "11............" & @CRLF $aNumber[5] &= ".............." & @CRLF $aNumber[5] &= "11.11.11.11..." & @CRLF $aNumber[5] &= "11.11.11.11..." & @CRLF $aNumber[5] &= ".............." & @CRLF $aNumber[5] &= "............11" & @CRLF $aNumber[5] &= "............11" & @CRLF $aNumber[5] &= ".............." & @CRLF $aNumber[5] &= "............11" & @CRLF $aNumber[5] &= "............11" & @CRLF $aNumber[5] &= ".............." & @CRLF $aNumber[5] &= "11..........11" & @CRLF $aNumber[5] &= "11..........11" & @CRLF $aNumber[5] &= ".............." & @CRLF $aNumber[5] &= "...11.11.11..." & @CRLF $aNumber[5] &= "...11.11.11..." & @CRLF $aNumber[6] = "" ; Pattern for '6' $aNumber[6] &= "......11.11..." & @CRLF $aNumber[6] &= "......11.11..." & @CRLF $aNumber[6] &= ".............." & @CRLF $aNumber[6] &= "...11........." & @CRLF $aNumber[6] &= "...11........." & @CRLF $aNumber[6] &= ".............." & @CRLF $aNumber[6] &= "11............" & @CRLF $aNumber[6] &= "11............" & @CRLF $aNumber[6] &= ".............." & @CRLF $aNumber[6] &= "11.11.11.11..." & @CRLF $aNumber[6] &= "11.11.11.11..." & @CRLF $aNumber[6] &= ".............." & @CRLF $aNumber[6] &= "11..........11" & @CRLF $aNumber[6] &= "11..........11" & @CRLF $aNumber[6] &= ".............." & @CRLF $aNumber[6] &= "11..........11" & @CRLF $aNumber[6] &= "11..........11" & @CRLF $aNumber[6] &= ".............." & @CRLF $aNumber[6] &= "...11.11.11..." & @CRLF $aNumber[6] &= "...11.11.11..." & @CRLF $aNumber[7] = "" ; Pattern for '7' $aNumber[7] &= "11.11.11.11.11" & @CRLF $aNumber[7] &= "11.11.11.11.11" & @CRLF $aNumber[7] &= ".............." & @CRLF $aNumber[7] &= "............11" & @CRLF $aNumber[7] &= "............11" & @CRLF $aNumber[7] &= ".............." & @CRLF $aNumber[7] &= ".........11..." & @CRLF $aNumber[7] &= ".........11..." & @CRLF $aNumber[7] &= ".............." & @CRLF $aNumber[7] &= "......11......" & @CRLF $aNumber[7] &= "......11......" & @CRLF $aNumber[7] &= ".............." & @CRLF $aNumber[7] &= "...11........." & @CRLF $aNumber[7] &= "...11........." & @CRLF $aNumber[7] &= ".............." & @CRLF $aNumber[7] &= "...11........." & @CRLF $aNumber[7] &= "...11........." & @CRLF $aNumber[7] &= ".............." & @CRLF $aNumber[7] &= "...11........." & @CRLF $aNumber[7] &= "...11........." & @CRLF $aNumber[8] = "" ; Pattern for '8' $aNumber[8] &= "...11.11.11..." & @CRLF $aNumber[8] &= "...11.11.11..." & @CRLF $aNumber[8] &= ".............." & @CRLF $aNumber[8] &= "11..........11" & @CRLF $aNumber[8] &= "11..........11" & @CRLF $aNumber[8] &= ".............." & @CRLF $aNumber[8] &= "11..........11" & @CRLF $aNumber[8] &= "11..........11" & @CRLF $aNumber[8] &= ".............." & @CRLF $aNumber[8] &= "...11.11.11..." & @CRLF $aNumber[8] &= "...11.11.11..." & @CRLF $aNumber[8] &= ".............." & @CRLF $aNumber[8] &= "11..........11" & @CRLF $aNumber[8] &= "11..........11" & @CRLF $aNumber[8] &= ".............." & @CRLF $aNumber[8] &= "11..........11" & @CRLF $aNumber[8] &= "11..........11" & @CRLF $aNumber[8] &= ".............." & @CRLF $aNumber[8] &= "...11.11.11..." & @CRLF $aNumber[8] &= "...11.11.11..." & @CRLF $aNumber[9] = "" ; Pattern for '9' $aNumber[9] &= "...11.11.11..." & @CRLF $aNumber[9] &= "...11.11.11..." & @CRLF $aNumber[9] &= ".............." & @CRLF $aNumber[9] &= "11..........11" & @CRLF $aNumber[9] &= "11..........11" & @CRLF $aNumber[9] &= ".............." & @CRLF $aNumber[9] &= "11..........11" & @CRLF $aNumber[9] &= "11..........11" & @CRLF $aNumber[9] &= ".............." & @CRLF $aNumber[9] &= "...11.11.11.11" & @CRLF $aNumber[9] &= "...11.11.11.11" & @CRLF $aNumber[9] &= ".............." & @CRLF $aNumber[9] &= "............11" & @CRLF $aNumber[9] &= "............11" & @CRLF $aNumber[9] &= ".............." & @CRLF $aNumber[9] &= ".........11..." & @CRLF $aNumber[9] &= ".........11..." & @CRLF $aNumber[9] &= ".............." & @CRLF $aNumber[9] &= "...11.11......" & @CRLF $aNumber[9] &= "...11.11......" & @CRLF Switch $sPattern Case $aNumber[0] Return 0 Case $aNumber[1] Return 1 Case $aNumber[2] Return 2 Case $aNumber[3] Return 3 Case $aNumber[4] Return 4 Case $aNumber[5] Return 5 Case $aNumber[6] Return 6 Case $aNumber[7] Return 7 Case $aNumber[8] Return 8 Case $aNumber[9] Return 9 Case Else Return SetError(1, 0, "") EndSwitch EndFunc ;==>_GetPattern ;-------------------------------------------------------------------------------------------------------------------------------- Func Test($sFilePath) ; _GetNumber for all the *.png files in $sFilePath directory ; List all the *.png files in $sFilePath directory Local $aFileList = _FileListToArray($sFilePath, "*.png", $FLTA_FILES) If @error = 1 Then MsgBox($MB_SYSTEMMODAL, "LineNumber:" & @ScriptLineNumber, "Path was invalid.") Exit EndIf If @error = 4 Then MsgBox($MB_SYSTEMMODAL, "LineNumber:" & @ScriptLineNumber, "No file(s) were found.") Exit EndIf _ArrayColInsert($aFileList, 1) ; add 1 column to hold the numbers For $i = 1 To $aFileList[0][0] $aFileList[$i][1] = _GetNumber($sFilePath & "\" & $aFileList[$i][0]) ; Rename a file using FileMove and overwrite the new file if it exists. ;~ FileMove($sFilePath & "\" & $aFileList[$i][0], $sFilePath & "\" & $aFileList[$i][1] & ".png", $FC_OVERWRITE) Next _ArrayDisplay($aFileList, "$aFileList") EndFunc ;==>Test ;--------------------------------------------------------------------------------------------------------------------------------1 point
-
I don't understand what you mean. What is your intent with this ? Background becomes black ? Foreground becomes black ?1 point
-
Just uploaded SciTEx86.zip & SciTEx64.zip which contain the Latest SciTE 5.5.3 versions released 9 October 2024.1 point
-
We have changed the login to require your Email address and disabled the option to use your member name to make the hacking of accounts harder, as that was happening regularly lately. We can assist in case you don't remember the Email address used at signup. Just use the "Contact us" link at the bottom of the page.1 point
-
Overview The example is named AutoIt and Python Integration. Integration here means data integration, where data e.g. arrays are passed back and forth between AutoIt and Python scripts. The technique is based on ROT objects registered in the Running Object Table (ROT). Relevant threads IRunningObjectTable AutoIt and Perl Integration AutoIt and VBScript Integration (middle of post) Execute VBScript method in AutoIt First post Running Object Table (ROT) A summary of the technique Two AutoIt Scripts Which data types can be passed? AutoIt and Python Integration Python Installation AutoIt and Python Simple examples Prime Numbers Python calculation of prime numbers and passing data to AutoIt Also prime number calculation with AutoIt and VB.NET code Runtimes Speed comparison of AutoIt, Python and VB.NET code Based on the prime number calculations above Python and VBScript Pass array between Python and VBScript 7z-file Running Object Table (ROT) The Running Object Table (ROT) is a system global table where objects can register themselves. This makes the objects available in processes other than the process in which the objects are created. These processes can be implemented in different programming languages. A ROT object is typically used to exchange data between the processes. An object is registered in the ROT through the IRunningObjectTable interface. A script that registers an object in the ROT is referred to as a server. A ROT object is usually available in the table as long as the server is running. IRunningObjectTable.au3 must be included in the server script. A script that uses an object in the ROT is referred to as a client. A client connects to a ROT object through functions such as GetObject(), GetActiveObject(), and the like. Therefore, a client doesn't depend on IRunningObjectTable.au3. A client and a server can exchange data through the ROT object. But two clients can also exchange data through a common server. Since IRunningObjectTable.au3 is an AutoIt include file, it's easy to create the server as an AutoIt script. As the data transfer takes place using COM objects, only COM compatible data can be transferred. If sender and receiver scripts are coded in different languages, then data exchange also depends on the data types being represented in both languages. Most script languages support simple data types such as integers, floats and strings as well as advanced data types such as arrays and dictionary objects. An advantage of using ROT objects is that internal data types of e.g. array elements are preserved during a data transfer. Below is demonstrated data exchange between AutoIt and Python. Eg. how to pass an array from AutoIt to Python, perform calculations with functions in the NumPy package, and return the results to AutoIt. But first there is a test on passing data between two AutoIt scripts. Two AutoIt ScriptsWhich data types can be exchanged through a ROT object between two AutoIt scripts running in two different processes? Examples in Examples\AutoItAutoIt\ folder. These are slight variations of the VarGetType() example in the help file. Server.au3: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_UseX64=Y Opt( "MustDeclareVars", 1 ) #include <GUIConstantsEx.au3> #include "..\..\Includes\IRunningObjectTable.au3" Server() Func Server() ; Create a default ROT-object (Dictionary object) ; The script that creates the ROT object is the server ; The ROT object is available while the server is running Local $sDataTransferObject = "DataTransferObject", $oDict $oDict = ROT_CreateDefaultObject( $sDataTransferObject, 0 ) ; 0 -> Non-unique ; AutoIt data types Local $aArray[2] = [ 1, "Example" ] Local $mMap[] Local $dBinary = Binary( "0x00204060" ) Local $bBoolean = False Local $pPtr = Ptr( -1 ) Local $hWnd = WinGetHandle( AutoItWinGetTitle() ) Local $iInt = 1 Local $fFloat = 2.0 Local $oObject = ObjCreate( "Scripting.Dictionary" ) Local $sString = "Some text" Local $tStruct = DllStructCreate( "wchar[256]" ) Local $vKeyword = Default Local $fuFunc = ConsoleWrite Local $fuUserFunc = Test ; Add data to $oDict $oDict.Item( "$aArray" ) = $aArray $oDict.Item( "$mMap" ) = $mMap $oDict.Item( "$dBinary" ) = $dBinary $oDict.Item( "$bBoolean" ) = $bBoolean $oDict.Item( "$pPtr" ) = $pPtr $oDict.Item( "$hWnd" ) = $hWnd $oDict.Item( "$iInt" ) = $iInt $oDict.Item( "$fFloat" ) = $fFloat $oDict.Item( "$oObject" ) = $oObject $oDict.Item( "$sString" ) = $sString $oDict.Item( "$tStruct" ) = $tStruct $oDict.Item( "$vKeyword" ) = $vKeyword $oDict.Item( "$fuFunc" ) = $fuFunc $oDict.Item( "$fuUserFunc" ) = $fuUserFunc ; Create server GUI Local $hGui = GUICreate( "Server", 200, 70, 200, 50 ) ; Show GUI GUISetState() MsgBox( 0, "Variable Types on Server", _ "$aArray : " & @TAB & @TAB & VarGetType( $aArray ) & " variable type" & @CRLF & _ "$mMap : " & @TAB & @TAB & VarGetType( $mMap ) & " variable type" & @CRLF & _ "$dBinary : " & @TAB & VarGetType( $dBinary ) & " variable type" & @CRLF & _ "$bBoolean : " & @TAB & VarGetType( $bBoolean ) & " variable type" & @CRLF & _ "$pPtr : " & @TAB & @TAB & VarGetType( $pPtr ) & " variable type" & @CRLF & _ "$hWnd : " & @TAB & @TAB & VarGetType( $hWnd ) & " variable type" & @CRLF & _ "$iInt : " & @TAB & @TAB & VarGetType( $iInt ) & " variable type" & @CRLF & _ "$fFloat : " & @TAB & @TAB & VarGetType( $fFloat ) & " variable type" & @CRLF & _ "$oObject : " & @TAB & VarGetType( $oObject ) & " variable type" & @CRLF & _ "$sString : " & @TAB & VarGetType( $sString ) & " variable type" & @CRLF & _ "$tStruct : " & @TAB & VarGetType( $tStruct ) & " variable type" & @CRLF & _ "$vKeyword : " & @TAB & VarGetType( $vKeyword ) & " variable type" & @CRLF & _ "$fuFunc : " & @TAB & VarGetType( $fuFunc ) & " variable type" & @CRLF & _ "$fuUserFunc : " & @TAB & VarGetType( $fuUserFunc ) & " variable type" ) ; Loop While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete( $hGui ) EndFunc Func Test() EndFunc Run the script by double clicking. MsgBox output: Variable Types on Server $aArray : Array variable type $mMap : Map variable type $dBinary : Binary variable type $bBoolean : Bool variable type $pPtr : Ptr variable type $hWnd : Ptr variable type $iInt : Int32 variable type $fFloat : Double variable type $oObject : Object variable type $sString : String variable type $tStruct : DLLStruct variable type $vKeyword : Keyword variable type $fuFunc : Function variable type $fuUserFunc : UserFunction variable type Just leave the MsgBox running. Client.au3: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_UseX64=Y Opt( "MustDeclareVars", 1 ) #include <GUIConstantsEx.au3> ; IRunningObjectTable.au3 UDF ; not needed in the client. Client() Func Client() ; Error monitoring. This will trap all COM errors while alive. Local $oErrorHandler = ObjEvent( "AutoIt.Error", "COMerror" ) ; Get default ROT-object (Dict obj) Local $oDict = ObjGet( "DataTransferObject" ) Local $aArray = $oDict.Item( "$aArray" ), $aArrayErr = @error Local $mMap = $oDict.Item( "$mMap" ), $mMapErr = @error Local $dBinary = $oDict.Item( "$dBinary" ), $dBinaryErr = @error Local $bBoolean = $oDict.Item( "$bBoolean" ), $bBooleanErr = @error Local $pPtr = $oDict.Item( "$pPtr" ), $pPtrErr = @error Local $hWnd = $oDict.Item( "$hWnd" ), $hWndErr = @error Local $iInt = $oDict.Item( "$iInt" ), $iIntErr = @error Local $fFloat = $oDict.Item( "$fFloat" ), $fFloatErr = @error Local $oObject = $oDict.Item( "$oObject" ), $oObjectErr = @error Local $sString = $oDict.Item( "$sString" ), $sStringErr = @error Local $tStruct = $oDict.Item( "$tStruct" ), $tStructErr = @error Local $vKeyword = $oDict.Item( "$vKeyword" ), $vKeywordErr = @error Local $fuFunc = $oDict.Item( "$fuFunc" ), $fuFuncErr = @error Local $fuUserFunc = $oDict.Item( "$fuUserFunc" ), $fuUserFuncErr = @error ConsoleWrite( "Variable Types on Client" & @CRLF ) ConsoleWrite( "$aArray : " & ( $aArrayErr ? "@error = " & $aArrayErr : VarGetType( $aArray ) & " variable type" ) & @CRLF ) ConsoleWrite( "$mMap : " & ( $mMapErr ? "@error = " & $mMapErr : VarGetType( $mMap ) & " variable type" ) & @CRLF ) ConsoleWrite( "$dBinary : " & ( $dBinaryErr ? "@error = " & $dBinaryErr : VarGetType( $dBinary ) & " variable type" ) & @CRLF ) ConsoleWrite( "$bBoolean : " & ( $bBooleanErr ? "@error = " & $bBooleanErr : VarGetType( $bBoolean ) & " variable type" ) & @CRLF ) ConsoleWrite( "$pPtr : " & ( $pPtrErr ? "@error = " & $pPtrErr : VarGetType( $pPtr ) & " variable type" ) & @CRLF ) ConsoleWrite( "$hWnd : " & ( $hWndErr ? "@error = " & $hWndErr : VarGetType( $hWnd ) & " variable type" ) & @CRLF ) ConsoleWrite( "$iInt : " & ( $iIntErr ? "@error = " & $iIntErr : VarGetType( $iInt ) & " variable type" ) & @CRLF ) ConsoleWrite( "$fFloat : " & ( $fFloatErr ? "@error = " & $fFloatErr : VarGetType( $fFloat ) & " variable type" ) & @CRLF ) ConsoleWrite( "$oObject : " & ( $oObjectErr ? "@error = " & $oObjectErr : VarGetType( $oObject ) & " variable type" ) & @CRLF ) ConsoleWrite( "$sString : " & ( $sStringErr ? "@error = " & $sStringErr : VarGetType( $sString ) & " variable type" ) & @CRLF ) ConsoleWrite( "$tStruct : " & ( $tStructErr ? "@error = " & $tStructErr : VarGetType( $tStruct ) & " variable type" ) & @CRLF ) ConsoleWrite( "$vKeyword : " & ( $vKeywordErr ? "@error = " & $vKeywordErr : VarGetType( $vKeyword ) & " variable type" ) & @CRLF ) ConsoleWrite( "$fuFunc : " & ( $fuFuncErr ? "@error = " & $fuFuncErr : VarGetType( $fuFunc ) & " variable type" ) & @CRLF ) ConsoleWrite( "$fuUserFunc : " & ( $fuUserFuncErr ? "@error = " & $fuUserFuncErr : VarGetType( $fuUserFunc ) & " variable type" ) & @CRLF ) ConsoleWrite( @CRLF & "@error = -2147221163 = 0x80040155" & @CRLF & " Interface not registered" & @CRLF ) #forceref $oErrorHandler EndFunc Func COMerror() EndFunc Run the script in SciTE with F5. The object event message handler, $oErrorHandler, is used to set an error code in @error. Console output: Variable Types on Client $aArray : Array variable type $mMap : @error = -2147221163 $dBinary : Binary variable type $bBoolean : Bool variable type $pPtr : Int32 variable type $hWnd : Int32 variable type $iInt : Int32 variable type $fFloat : Double variable type $oObject : Object variable type $sString : String variable type $tStruct : @error = -2147221163 $vKeyword : Keyword variable type $fuFunc : @error = -2147221163 $fuUserFunc : @error = -2147221163 @error = -2147221163 = 0x80040155 Interface not registered There are 3 COM incompatible data types that all fail with error code 0x80040155, Interface not registered: Map, DllStruct and Function. An inspection of these data types with code in InspectVariable.au3 from Accessing AutoIt Variables gives this result: InspectVariable.txt: $mMap Type = Map ptr = 0x009B5FF8 ($pVariant) vt = 0x0024 (VT_RECORD, pointer to record object) data = 0x00000000 $tStruct Type = DLLStruct ptr = 0x009E3C08 ($pVariant) vt = 0x0024 (VT_RECORD, pointer to record object) data = 0x00000000 $fuFunc Type = Function ptr = 0x009E3C98 ($pVariant) vt = 0x0024 (VT_RECORD, pointer to record object) data = 0x00000000 $fuUserFunc Type = UserFunction ptr = 0x009E3C98 ($pVariant) vt = 0x0024 (VT_RECORD, pointer to record object) data = 0x00000000 In all cases the variant data type is VT_RECORD used for user defined types (UDTs) and the data field, which should be a pointer to the IRecordInfo interface, is a NULL pointer. It's thus not possible to obtain more information about these data types. At least not through the techniques in Accessing AutoIt Variables. The bottom line seems to be that the data types are coded through COM incompatible custom implementations in the AutoIt internal C/C++ code. AutoIt and Python Integration The rather elusive code box at top of this post nevertheless indicates how to access a ROT object in Python through the GetObject() function. This allows data to be exchanged between AutoIt and Python. But first Python must be installed. Python InstallationPython 3.8.0 is the latest version that can be installed on Windows 7. To avoid spending too much time on installation, it's easiest to just download the Windows x86-64 executable installer (python-3.8.0-amd64.exe) at bottom of the page and install Python from there. Make sure that the path to the Python installation folder is added to environment variables. Necessary for AutoIt commands like Run and RunWait to find Python.exe without specifying the full path, which can be different from one PC to another. Upgrade PIP package manager: C:\>py -m pip install --upgrade pip Install PyWin32 package to access the Windows API C:\>py -m pip install --upgrade pywin32 Install NumPy package with support for arrays and matrices C:\>py -m pip install --upgrade numpy AutoIt and PythonExamples\AutoItPython\ contains 3 small AutoIt scripts and 2 Python scripts for a simple demonstration of passing arrays back and forth between AutoIt and Python. Open a command prompt and run the 5 scripts in a similar way: C:\>d: D:\>cd D:\...\Examples\AutoItPython D:\...\Examples\AutoItPython>subst z: . D:\...\Examples\AutoItPython>z: Z:\>"0) Server.au3" Z:\>"1) AutoIt send.au3" Z:\>"2) Python rec.py" (123, 456.789, 'String') 123 <class 'int'> 456.789 <class 'float'> String <class 'str'> ((1, 2, 3, 4), (5, 6, 7, 8), (9, 10, 11, 12)) (1, 2, 3, 4) Z:\>"3) Python send.py" Z:\>"4) AutoIt rec.au3" Z:\>d: D:\...\Examples\AutoItPython>subst z: /d It should be enough to press 0+Tab to execute "0) Server.au3". Correspondingly for the other scripts. 0) Server.au3: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_UseX64=Y Opt( "MustDeclareVars", 1 ) #include <GUIConstantsEx.au3> #include "IRunningObjectTable.au3" Server() Func Server() ; Create a default ROT-object (Dictionary object) ; The script that creates the ROT object is the server ; The ROT object is available while the server is running Local $sDataTransferObject = "DataTransferObject" ROT_CreateDefaultObject( $sDataTransferObject, 0 ) ; 0 -> Non-unique ; Create server GUI Local $hGui = GUICreate( "Server", 200, 70, 200, 50 ) ; Show GUI GUISetState() ; Loop While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch WEnd GUIDelete( $hGui ) EndFunc 1) AutoIt send.au3: #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_UseX64=Y Opt( "MustDeclareVars", 1 ) Example() Func Example() ; Get default ROT-object (Dictionary object) Local $oDict = ObjGet( "DataTransferObject" ) ; Add 1d array to $oDict Local $aArray1 = [ 123, 456.789, "String" ] $oDict.Item( "aArray1" ) = $aArray1 ; Add 2d array to $oDict ; In AutoIt and Python, rows and columns are swapped ; The AutoIt array below will result in the following Python array ; aArray = [ [ 1, 2, 3, 4 ], [ 5, 6, 7, 8 ], [ 9, 10, 11, 12 ] ] Local $aArray2 = [ _ [ 1, 5, 9 ], _ [ 2, 6, 10 ], _ [ 3, 7, 11 ], _ [ 4, 8, 12 ] ] $oDict.Item( "aArray2" ) = $aArray2 EndFunc 2) Python rec.py: import win32com.client import numpy as np # Get default ROT-object (Dictionary object) oDict = win32com.client.GetObject( "DataTransferObject" ) # Get 1d AutoIt array as List aArray1 = oDict( "aArray1" ) print( aArray1 ) print( "" ) # Print data types for item in aArray1: print( "{}\t{}".format( item, type( item ) ) ) print( "" ) # Get 2d array as NumPy array np.aArray2 = oDict( "aArray2" ) print( np.aArray2 ) print( np.aArray2[0] ) These are the _ArrayDisplay's created by 4) AutoIt rec.au3: Prime NumbersExamples\Prime numbers\1) Scripts\ contains scripts to calculate prime numbers using AutoIt, Python and VB.NET. Run au3-scripts in SciTE with F5. pyPrimes.au3: #AutoIt3Wrapper_Au3Check_Parameters=-d -w- 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7 #AutoIt3Wrapper_UseX64=Y Opt( "MustDeclareVars", 1 ) #include "..\..\..\Includes\IRunningObjectTable.au3" #include "..\..\..\Includes\DataDisplay\Functions\ArrayDisplayEx\ArrayDisplayEx.au3" #include "..\..\..\Includes\DataDisplay\Functions\ArrayDisplayEx\ArrayDisplayEx_ColumnFormats.au3" ; Create a default ROT-object (Dictionary object) ; The script that creates the ROT object is the server ; The ROT object is available while the server is running Global $sDataTransferObject = "DataTransferObject" Global $oDict = ROT_CreateDefaultObject( $sDataTransferObject, 0 ) ; 0 -> Non-unique Example( 100 ) Example( 1000 ) Example( 10000 ) Func Example( $nPrimes ) Local $aAlignment = [ [ 0, "C" ], [ 1, "R" ] ] Local $aColWidthMin = [ [ 0, 65 ], [ 1, 80 ] ] Local $aColFormats = [ 0, "Int1000Sep", "," ] ; DATA SOURCE column index Local $aFeatures = [ [ "ColAlign", $aAlignment ], _ [ "ColWidthMin", $aColWidthMin ], _ [ "ColFormats", $aColFormats ], _ [ "1dColumns", 10 ] ] RunWait( "Python.exe pyPrimes.py " & """" & $nPrimes & """", "", @SW_HIDE ) Local $aPrimes = $oDict.Item( "aPrimes" ) _ArrayDisplayEx( $aPrimes, "Prime numbers", "#|Primes", 0, $aFeatures ) EndFunc pyPrimes.py: import sys import math as ma import numpy as np import win32com.client # Get default ROT-object (Dictionary object) oDict = win32com.client.GetObject( "DataTransferObject" ) def CalcPrimes( nPrimes ): # Define NumPy array to store prime numbers aPrimes = np.zeros( shape = ( nPrimes, ), dtype = np.int32 ) # Store first prime iPrime = 2 iPrimes = 0 aPrimes[iPrimes] = iPrime iPrimes += 1 iPrime += 1 # Calculate primes while iPrimes < nPrimes: i = 1 iMaxFactor = ma.ceil(ma.sqrt(iPrime)) while i < iPrimes and aPrimes[i] <= iMaxFactor: if ma.fmod( iPrime, aPrimes[i] ) == 0: i = iPrimes i += 1 if i < iPrimes + 1: aPrimes[iPrimes] = iPrime iPrimes += 1 iPrime += 2 oDict[ "aPrimes" ] = aPrimes CalcPrimes( int( sys.argv[1] ) ) RuntimesExamples\Prime numbers\2) Runtimes\ is a speed comparison of the 3 prime number calculations performed with the techniques in Runtimes and Speed Comparisons. Run Primes.au3 in SciTE with F5. Primes.txt: Calculation of Prime Numbers Calculation of Prime Numbers AutoIt vs Python vs VB.NET AutoIt vs Python vs VB.NET Code executed as 64-bit code Code executed as 64-bit code ================================== ================================== 100 prime numbers 100 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: 7.1752 AutoIt calculation: 1.8151 Python calculation: 339.0743 Python calculation: 312.9130 VB.NET calculation: 0.1008 VB.NET calculation: 0.0481 500 prime numbers 500 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: 16.3156 AutoIt calculation: 14.9084 Python calculation: 317.8483 Python calculation: 314.0434 VB.NET calculation: 0.1665 VB.NET calculation: 0.1207 1,000 prime numbers 1,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: 38.2239 AutoIt calculation: 40.0983 Python calculation: 345.3165 Python calculation: 318.2725 VB.NET calculation: 0.5128 VB.NET calculation: 0.2229 2,000 prime numbers 2,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: 108.7436 AutoIt calculation: 102.3103 Python calculation: 357.4340 Python calculation: 353.0137 VB.NET calculation: 0.7696 VB.NET calculation: 0.4523 5,000 prime numbers 5,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: 351.2818 AutoIt calculation: 355.7042 Python calculation: 418.0871 Python calculation: 404.9797 VB.NET calculation: 1.6748 VB.NET calculation: 1.3370 10,000 prime numbers 10,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: 919.5793 AutoIt calculation: 928.2449 Python calculation: 602.1903 Python calculation: 553.9019 VB.NET calculation: 3.9493 VB.NET calculation: 3.1382 20,000 prime numbers 20,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: 2365.4960 AutoIt calculation: 2378.4718 Python calculation: 1161.5604 Python calculation: 991.8602 VB.NET calculation: 9.8814 VB.NET calculation: 8.0775 50,000 prime numbers 50,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: 8748.3280 AutoIt calculation: 8598.7165 Python calculation: 3422.4653 Python calculation: 2717.4886 VB.NET calculation: 33.1839 VB.NET calculation: 27.4017 100,000 prime numbers 100,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: 22959.9331 AutoIt calculation: 22686.7254 Python calculation: 8589.2150 Python calculation: 6701.6450 VB.NET calculation: 83.8414 VB.NET calculation: 69.6644 250,000 prime numbers 250,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: >10000.0000 AutoIt calculation: >10000.0000 Python calculation: 30198.3188 Python calculation: 23837.4175 VB.NET calculation: 293.9497 VB.NET calculation: 235.9579 500,000 prime numbers 500,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: >10000.0000 AutoIt calculation: >10000.0000 Python calculation: >10000.0000 Python calculation: >10000.0000 VB.NET calculation: 765.3462 VB.NET calculation: 600.5832 750,000 prime numbers 750,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: >10000.0000 AutoIt calculation: >10000.0000 Python calculation: >10000.0000 Python calculation: >10000.0000 VB.NET calculation: 1346.5033 VB.NET calculation: 1051.7918 1,000,000 prime numbers 1,000,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: >10000.0000 AutoIt calculation: >10000.0000 Python calculation: >10000.0000 Python calculation: >10000.0000 VB.NET calculation: 2011.5523 VB.NET calculation: 1567.1886 2,500,000 prime numbers 2,500,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: >10000.0000 AutoIt calculation: >10000.0000 Python calculation: >10000.0000 Python calculation: >10000.0000 VB.NET calculation: 7297.9896 VB.NET calculation: 5667.4302 5,000,000 prime numbers 5,000,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: >10000.0000 AutoIt calculation: >10000.0000 Python calculation: >10000.0000 Python calculation: >10000.0000 VB.NET calculation: 19501.3542 VB.NET calculation: 15133.7115 10,000,000 prime numbers 10,000,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: >10000.0000 AutoIt calculation: >10000.0000 Python calculation: >10000.0000 Python calculation: >10000.0000 VB.NET calculation: >10000.0000 VB.NET calculation: >10000.0000 16,000,000 prime numbers 16,000,000 prime numbers ---------------------------------- ---------------------------------- AutoIt calculation: >10000.0000 AutoIt calculation: >10000.0000 Python calculation: >10000.0000 Python calculation: >10000.0000 VB.NET calculation: >10000.0000 VB.NET calculation: >10000.0000 The measurements in the left column are carried out on a Windows 7, medium, 6½ year old PC. The measurements on the right on a Windows 10, medium (high end), 1½ year old PC. A comparison of AutoIt and Python code shows that AutoIt performs best for a small number of prime numbers. This is due to an overhead when passing data from Python to AutoIt. When calculating about 7,500 prime numbers and higher, Python code becomes faster than AutoIt code. Up to about 3 times faster in these measurements. This is probably due to differences in AutoIt and Python code interpreters. The performance optimization when using real compiled VB.NET code is quite clear. Up to 100 and 300 times faster than Python and AutoIt code respectively. Both Python and VB.NET code perform about 25% better on newer hardware. AutoIt code shows the same performance on old and new hardware. The lack of optimization can probably only be attributed to the Windows 10 operating system. Python and VBScriptExamples\PythonVBScript\ shows the exchange of array data between Python and VBScript through a ROT object created by an AutoIt server. Note the simplicity of the code. Open a command prompt and run the 5 scripts in a similar way: C:\>d: D:\>cd D:\...\Examples\PythonVBScript D:\...\Examples\PythonVBScript>subst z: . D:\...\Examples\PythonVBScript>z: Z:\>"0) Server.au3" Z:\>"1) Python send.py" Z:\>"2) VBScript rec.vbs" Z:\>"3) VBScript send.vbs" Z:\>"4) Python rec.py" (123, 456.789, 'String') 123 <class 'int'> 456.789 <class 'float'> String <class 'str'> Z:\> Z:\>d: D:\...\Examples\PythonVBScript>subst z: /d 1) Python send.py: import win32com.client # Get default ROT-object (Dictionary object) oDict = win32com.client.GetObject( "DataTransferObject" ) # Add 1d List to oDict aArray1 = [ 123, 456.789, "String" ] oDict[ "aArray1" ] = aArray1 2) VBScript rec.vbs: 'Get default ROT-object (Dictionary object) Set oDict = GetObject( "DataTransferObject" ) aArray1 = oDict( "aArray1" ) MsgBox( "aArray1(0) = " & aArray1(0) & vbTab & vbTab & "Variant type = " & VarType( aArray1(0) ) & " (vbLong)" & vbCrLf & _ "aArray1(1) = " & aArray1(1) & vbTab & "Variant type = " & VarType( aArray1(1) ) & " (vbDouble)" & vbCrLf & _ "aArray1(2) = " & aArray1(2) & vbTab & vbTab & "Variant type = " & VarType( aArray1(2) ) & " (vbString)" & vbCrLf ) This is the MsgBox created by 2) VBScript rec.vbs: 7z-file The 7z-file contains source code for UDFs and examples You need AutoIt 3.3.16.1 or later. Tested on Windows 7 and Windows 10. Comments are welcome. Let me know if there are any issues. AutoItPython.7z1 point