Popular Post genius257 Posted June 10, 2021 Popular Post Share Posted June 10, 2021 (edited) Ever needed C style nested structs, unions or easy pointer references in your DllStruct? Then this may be your solution! It also comes with some quality of life functions for better debugging, like being able to get the original string you used when creating the struct. Download: latest Example: expandcollapse popup#AutoIt3Wrapper_Change2CUI=Y #NoTrayIcon #include <WinAPIHObj.au3> #include <WinAPIError.au3> #include <WinAPISysWin.au3> #include <WinAPIProc.au3> #include <WinAPIFiles.au3> #include <String.au3> #include "DllStructEx.au3" #include "DllStructEx.debug.au3" #Region Global variables Global Const $tagCONSOLE_CURSOR_INFO = "dword dwSize;int bVisible" Global Const $tagINPUT_RECORD = _ "WORD EventType;"& _ "union {"& _ " KEY_EVENT_RECORD KeyEvent;"& _ " MOUSE_EVENT_RECORD MouseEvent;"& _ " WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;"& _ " MENU_EVENT_RECORD MenuEvent;"& _ " FOCUS_EVENT_RECORD FocusEvent;"& _ "} Event;" Global Const $EventType_FOCUS_EVENT = 0x0010, $EventType_KEY_EVENT = 0x0001, $EventType_MENU_EVENT = 0x0008, $EventType_MOUSE_EVENT = 0x0002, $EventType_WINDOW_BUFFER_SIZE_EVENT = 0x0004 Global Const $tagKEY_EVENT_RECORD = _ "BOOL bKeyDown;"& _ "WORD wRepeatCount;"& _ "WORD wVirtualKeyCode;"& _ "WORD wVirtualScanCode;"& _ "union {"& _ " WCHAR UnicodeChar;"& _ " CHAR AsciiChar;"& _ "} uChar;"& _ "DWORD dwControlKeyState;" Global Const $tagMOUSE_EVENT_RECORD = _ "COORD dwMousePosition;" & _ "DWORD dwButtonState;" & _ "DWORD dwControlKeyState;" & _ "DWORD dwEventFlags;" Global Const $tagCOORD = _ "SHORT X;"& _ "SHORT Y;" Global Const $tagWINDOW_BUFFER_SIZE_RECORD = _ "COORD dwSize;" Global Const $tagMENU_EVENT_RECORD = _ "UINT dwCommandId;" Global Const $tagFOCUS_EVENT_RECORD = _ "BOOL bSetFocus;" Global Const $tagCONSOLE_SCREEN_BUFFER_INFO = _ "COORD dwSize;"& _ "COORD dwCursorPosition;"& _ "WORD wAttributes;"& _ "SMALL_RECT srWindow;"& _ "COORD dwMaximumWindowSize;" Global Const $tagSMALL_RECT = _ "SHORT Left;"& _ "SHORT Top;"& _ "SHORT Right;"& _ "SHORT Bottom;" #EndRegion Global variables #Region Functions Func AllocConsole() Local $aRet = DllCall("kernel32.dll", "BOOL", "AllocConsole") If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func FreeConsole() Local $aRet = DllCall("kernel32.dll", "BOOL", "FreeConsole") If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func IsDebuggerPresent() Local $aRet = DllCall("kernel32.dll", "BOOL", "IsDebuggerPresent") If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func SetConsoleMode($hConsoleHandle, $dwMode) Local $aRet = DllCall("kernel32.dll", "BOOL", "SetConsoleMode", "HANDLE", $hConsoleHandle, "DWORD", $dwMode) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func SetStdHandle($nStdHandle, $hHandle) ;returns BOOL ;http://msdn.microsoft.com/en-us/library/windows/desktop/ms686244%28v=vs.85%29.aspx Local $aRet = DllCall("kernel32.dll", "BOOL", "SetStdHandle", "DWORD", $nStdHandle, "HANDLE", $hHandle) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func CreateFile($lpFileName, $dwDesiredAccess, $dwShareMode, $lpSecurityAttributes, $dwCreationDisposition, $dwFlagsAndAttributes) Local $aResult = DllCall("kernel32.dll", "handle", "CreateFileW", "wstr", $lpFileName, "dword", $dwDesiredAccess, "dword", $dwShareMode, "struct*", $lpSecurityAttributes, "dword", $dwCreationDisposition, "dword", $dwFlagsAndAttributes, "ptr", 0) If @error Or ($aResult[0] = Ptr(-1)) Then Return SetError(@error, @extended, 0) ; $INVALID_HANDLE_VALUE Return $aResult[0] EndFunc Func GetConsoleCursorInfo($hConsole, $lpConsoleCursorInfo) Local $aRet = DllCall("kernel32.dll", "BOOL", "GetConsoleCursorInfo", "hwnd", $hConsole, "STRUCT*", $lpConsoleCursorInfo) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func SetConsoleCursorInfo($hConsole, $lpConsoleCursorInfo) Local $aRet = DllCall("kernel32.dll", "BOOL", "SetConsoleCursorInfo", "hwnd", $hConsole, "STRUCT*", $lpConsoleCursorInfo) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func SetConsoleCtrlHandler($HandlerRoutine, $Add) Local $aRet = DllCall("kernel32.dll", "BOOL", "SetConsoleCtrlHandler", "ptr", $HandlerRoutine, "BOOL", $Add) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func GetConsoleScreenBufferInfo($hConsole, $tScreenBufferInfo) $aRet = DllCall("kernel32.dll", "bool", "GetConsoleScreenBufferInfo", "hwnd", $hConsole, "STRUCT*", $tScreenBufferInfo) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func GetConsoleCursorPosition($hConsoleOutput, $dwCursorPosition, $tScreenBufferInfo) GetConsoleScreenBufferInfo($hConsoleOutput, $tScreenBufferInfo) If @error <> 0 Then Return SetError(@error, @extended, False) $dwCursorPosition = DllStructCreate($tagCOORD, DllStructGetPtr($tScreenBufferInfo, 2)) $dwCursorPosition.X = $dwCursorPosition.X $dwCursorPosition.Y = $dwCursorPosition.Y Return True EndFunc Func SetConsoleCursorPosition($hConsoleOutput, $dwCursorPosition) Local $aRet = DllCall("kernel32.dll", "BOOL", "SetConsoleCursorPosition", "HANDLE", $hConsoleOutput, "STRUCT", $dwCursorPosition) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func ReadConsoleInput($hConsoleInput, $lpBuffer, $nLength) Local $aRet = DllCall("kernel32.dll", "BOOL", "ReadConsoleInput", "HANDLE", $hConsoleInput, "STRUCT*", $lpBuffer, "DWORD", $nLength, "DWORD*", 0) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func FillConsoleOutputCharacter($hConsoleInput, $cCharacter, $nLength, $dwWriteCoord) Local $aRet = DllCall("kernel32.dll", "BOOL", "FillConsoleOutputCharacterW", "HANDLE", $hConsoleInput, "BYTE", $cCharacter, "DWORD", $nLength, "STRUCT", $dwWriteCoord, "DWORD*", 0) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func SetConsoleScreenBufferSize($hConsoleOutput, $dwSize) Local $aRet = DllCall("kernel32.dll", "BOOL", "SetConsoleScreenBufferSize", "HANDLE", $hConsoleOutput, "STRUCT", $dwSize) If @error <> 0 Then Return SetError(@error, 0, False) Return $aRet[0] <> 0 EndFunc Func _ConsoleWriteCenter($columns, $rows, $hStdOut, $sText) Local $_tCOORD = DllStructCreate($tagCOORD) Local $tCOORD = DllStructCreate($tagCOORD) ;GetConsoleCursorPosition($hStdOut, $_tCOORD, $tScreenBufferInfo) Local $s = $sText Local $l = StringLen($s) $tCOORD.X = Round($columns / 2) - Round($l / 2) $tCOORD.Y = Round($rows / 2) SetConsoleCursorPosition($hStdOut, $tCOORD) _WinAPI_WriteConsole($hStdOut, $s) SetConsoleCursorPosition($hStdOut, $_tCOORD) EndFunc Func _ConsoleHideCursor($hStdOut) Local $tConsoleCursorInfo = DllStructCreate($tagCONSOLE_CURSOR_INFO) GetConsoleCursorInfo($hStdOut, $tConsoleCursorInfo) $tConsoleCursorInfo.bVisible = 0 SetConsoleCursorInfo($hStdOut, $tConsoleCursorInfo) EndFunc #EndRegion Functions $a = AllocConsole() $aRet = DllCall("kernel32.dll", "ptr", "GetConsoleWindow") _WinAPI_ShowWindow($aRet[0], @SW_SHOWNORMAL) $hConOut = CreateFile("CONOUT$", BitOR($GENERIC_READ, $GENERIC_WRITE), BitOR($FILE_SHARE_READ, $FILE_SHARE_WRITE), Null, $OPEN_EXISTING, $FILE_ATTRIBUTE_NORMAL) $hConIn = CreateFile("CONIN$", BitOR($GENERIC_READ, $GENERIC_WRITE), BitOR($FILE_SHARE_READ, $FILE_SHARE_WRITE), Null, $OPEN_EXISTING, $FILE_ATTRIBUTE_NORMAL) Global Const $STD_INPUT_HANDLE = -10 Global Const $STD_OUTPUT_HANDLE = -11 Global Const $STD_ERROR_HANDLE = -12 SetStdHandle($STD_OUTPUT_HANDLE, $hConOut) SetStdHandle($STD_INPUT_HANDLE, $hConIn) $hStdIn = _WinAPI_GetStdHandle(0) $hStdOut = _WinAPI_GetStdHandle(1) _ConsoleHideCursor($hStdOut) Global Const $ENABLE_EXTENDED_FLAGS = 0x0080 ;FIXME: store the original mode and restore on exit, to avoid parent console being affected. SetConsoleMode($hStdIn, $ENABLE_EXTENDED_FLAGS) Global $iRun = 1 Global Const $CTRL_C_EVENT = 0 Global Const $CTRL_BREAK_EVENT = 1 Global Const $CTRL_CLOSE_EVENT = 2 Global Const $CTRL_LOGOFF_EVENT = 5 Global Const $CTRL_SHUTDOWN_EVENT = 6 Func HandlerRoutine($dwCtrlType) ;ConsoleWrite("HandlerRoutine"&@CRLF) $iRun = 0 ;https://stackoverflow.com/a/48190051 DllCall("kernel32.dll", "NONE", "ExitThread", "DWORD", 0) Return True EndFunc $hHandlerRoutine = DllCallbackRegister(HandlerRoutine, "BOOL", "DWORD") $pHandlerRoutine = DllCallbackGetPtr($hHandlerRoutine) SetConsoleCtrlHandler($pHandlerRoutine, 1) Global $tCOORD = DllStructCreate($tagCOORD) GLobal $oScreenBufferInfo = DllStructExCreate($tagCONSOLE_SCREEN_BUFFER_INFO) Global Const $tScreenBufferInfo = DllStructExGetStruct($oScreenBufferInfo) Global Const $tSrWindow = DllStructExGetStruct($oScreenBufferInfo.srWindow) GetConsoleScreenBufferInfo($hStdOut, $tScreenBufferInfo) Global $columns = $tSrWindow.Right - $tSrWindow.Left + 1 Global $rows = $tSrWindow.Bottom - $tSrWindow.Top + 1 ;ConsoleWrite(StringFormat("columns: %d\n", $columns)) ;ConsoleWrite(StringFormat("rows: %d\n", $rows)) ;ConsoleWrite(StringFormat("%s x %s\n", $oScreenBufferInfo.dwSize.X, $oScreenBufferInfo.dwSize.y)) Global $tScreenBufferSize = DllStructCreate($tagCOORD) $tScreenBufferSize.X = $columns $tScreenBufferSize.Y = $rows SetConsoleScreenBufferSize($hStdOut, $tScreenBufferSize) _ConsoleWriteCenter($columns, $rows, $hStdOut, StringFormat("%s x %s", $columns, $rows)) $tCOORD.X = 0 $tCOORD.Y = 0 Global Const $FOCUS_EVENT = 0x0010 Global Const $KEY_EVENT = 0x0001 Global Const $MENU_EVENT = 0x0008 Global Const $MOUSE_EVENT = 0x0002 Global Const $WINDOW_BUFFER_SIZE_EVENT = 0x0004 $oINPUT_RECORD = DllStructExCreate($tagINPUT_RECORD) $tINPUT_RECORD = DllStructExGetStruct($oINPUT_RECORD) $tEvent = DllStructExGetStruct($oINPUT_RECORD.Event) $tFocusEvent = DllStructExGetStruct($oINPUT_RECORD.Event.FocusEvent) $tKeyEvent = DllStructExGetStruct($oINPUT_RECORD.Event.KeyEvent) ConsoleWrite(StringFormat("$tFocusEvent: %s\n", DllStructGetPtr($tFocusEvent))) ConsoleWrite(StringFormat("$tKeyEvent: %s\n", DllStructGetPtr($tKeyEvent))) DllStructExDisplay($oINPUT_RECORD) While $iRun Sleep(10) If DllCall("kernel32.dll", "BOOL", "GetNumberOfConsoleInputEvents", "handle", $hStdIn, "DWORD*", 0)[2] > 0 Then SetConsoleCursorPosition($hStdOut, $tCOORD) _WinAPI_WriteConsole($hStdOut, _StringRepeat(" ", $columns)) $tCOORD.Y = 1 SetConsoleCursorPosition($hStdOut, $tCOORD) _WinAPI_WriteConsole($hStdOut, _StringRepeat(" ", $columns)) $tCOORD.Y = 0 SetConsoleCursorPosition($hStdOut, $tCOORD) ReadConsoleInput($hStdIn, $tINPUT_RECORD, 1) ;_WinAPI_WriteConsole($hStdOut, DllStructGetData($tINPUT_RECORD, 1)) Switch ($oINPUT_RECORD.EventType) Case $EventType_FOCUS_EVENT _WinAPI_WriteConsole($hStdOut, "FOCUS_EVENT") $tCOORD.Y = 1 SetConsoleCursorPosition($hStdOut, $tCOORD) ;_WinAPI_WriteConsole($hStdOut, StringFormat("bSetFocus: %s", $oINPUT_RECORD.Event.FocusEvent.bSetFocus)) _WinAPI_WriteConsole($hStdOut, StringFormat("bSetFocus: %s", $tFocusEvent.bSetFocus)) Case $EventType_KEY_EVENT _WinAPI_WriteConsole($hStdOut, "KEY_EVENT") $tCOORD.Y = 1 SetConsoleCursorPosition($hStdOut, $tCOORD) $oEvent = $oINPUT_RECORD.Event $oKeyEvent = $oEvent.KeyEvent $ouChar = $oKeyEvent.uChar _WinAPI_WriteConsole($hStdOut, StringFormat("uChar: %s", $oINPUT_RECORD.Event.KeyEvent.uChar.AsciiChar)) Case $EventType_MENU_EVENT _WinAPI_WriteConsole($hStdOut, "MENU_EVENT") $tCOORD.Y = 1 SetConsoleCursorPosition($hStdOut, $tCOORD) _WinAPI_WriteConsole($hStdOut, StringFormat("dwCommandId: %s", $oINPUT_RECORD.Event.MenuEvent.dwCommandId)) Case $EventType_MOUSE_EVENT ;ConsoleWrite("MOUSE_EVENT"&@CRLF) _WinAPI_WriteConsole($hStdOut, "MOUSE_EVENT") Case $EventType_WINDOW_BUFFER_SIZE_EVENT _ConsoleHideCursor($hStdOut) $tCOORD.X = 0 $tCOORD.Y = 0 GetConsoleScreenBufferInfo($hStdOut, $tScreenBufferInfo) $columns = $tSrWindow.Right - $tSrWindow.Left + 1 $rows = $tSrWindow.Bottom - $tSrWindow.Top + 1 $tScreenBufferSize.X = $columns $tScreenBufferSize.Y = $rows SetConsoleScreenBufferSize($hStdOut, $tScreenBufferSize) FillConsoleOutputCharacter($hStdOut, " ", $columns * $rows, $tCOORD) SetConsoleCursorPosition($hStdOut, $tCOORD) _WinAPI_WriteConsole($hStdOut, "WINDOW_BUFFER_SIZE_EVENT") $tCOORD.Y = 1 SetConsoleCursorPosition($hStdOut, $tCOORD) _WinAPI_WriteConsole($hStdOut, StringFormat("SIZE: %sx%s", $oINPUT_RECORD.Event.WindowBufferSizeEvent.dwSize.X, $oINPUT_RECORD.Event.WindowBufferSizeEvent.dwSize.Y)) _ConsoleWriteCenter($columns, $rows, $hStdOut, StringFormat("%s x %s", $columns, $rows)) Case Else _WinAPI_WriteConsole($hStdOut, "*UNKNOWN*") EndSwitch EndIf WEnd Exit For debugging, DllStructEx.debug.au3 can be used, and feedback for missing debug features is welcome Edited November 16 by genius257 Updated version Beege, Danyfirex, wyl0205 and 4 others 7 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
UEZ Posted June 10, 2021 Share Posted June 10, 2021 Getting an error when executing Example.au3: 123 321 DllStructEx\Example.au3" (55) : ==> The requested action with this object has failed.: $tKEY_EVENT_RECORD = DllStructExGetStruct($txINPUT_RECORD.Event.KeyEvent) $tKEY_EVENT_RECORD = DllStructExGetStruct($txINPUT_RECORD.Event^ ERROR Interesting approach. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
genius257 Posted June 10, 2021 Author Share Posted June 10, 2021 36 minutes ago, UEZ said: Getting an error when executing Example.au3 Hi @UEZ Sorry it was a mistake on my part, not running my example code before release 😖 It should be fixed in version 1.0.1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
UEZ Posted June 10, 2021 Share Posted June 10, 2021 The example works now properly. Thx. Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
genius257 Posted July 27, 2022 Author Share Posted July 27, 2022 (edited) Version 1.1.0 released! Most important change is a fix to the byte padding, that previously made DllStructEx useless with unions and nested structs with external calls! 🎊 Edited October 14 by genius257 argumentum 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
genius257 Posted October 13 Author Share Posted October 13 Hey all So I'm working on this project again, trying to get it more stable, for use in some more complicated projects i am working on. I don't know how many are using this project or to what degree, but i would love some feedback for features or issues. Currently i am doing a rewrite for the parsing of struct strings, moving away from regular expressions and using a more hand made implementation. I am mostly done making my new parser compatible with the old one, currently only missing handling of "STRUCT;", "ENDSTRUCT;" and "ALIGN n;", since the old code handled that internally in a less than desirable way. After that i am also adding array support, since i am neck deep in the new parser anyways argumentum and Musashi 2 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
argumentum Posted October 14 Share Posted October 14 On 7/27/2022 at 7:50 PM, genius257 said: Version 1.1.0 Every 1.1.0 points to 1.0.1 Using "https://github.com/genius257/DllStructEx/releases/latest" will point to the latest version Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
genius257 Posted October 14 Author Share Posted October 14 13 hours ago, argumentum said: Every 1.1.0 points to 1.0.1 Thanks for the heads up I can understand how the top post link may have been wrong, but i don't get how i messed up with the 1.1.0 announcement post 🤔 I have updated the links for now 13 hours ago, argumentum said: Using "https://github.com/genius257/DllStructEx/releases/latest" will point to the latest version Might update the top posts to do this for the next release version argumentum 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
genius257 Posted November 16 Author Share Posted November 16 v2.0.0 is now available. The parser is now a hand written solution, instead of using regex This fixes multiple issues, most notable crash with exit code c0000005, while trying to parse a variant tag. Array support has also been added, this is what has taken the most time 😅. NOTE: DllStructEx is no longer contained in a single file. I plan on using my package script solution later to generate and attach a bundled version to every release automatically, but my dung beetle project is still not ready for use. Also little fun info: Every push and pull request for this project repository now triggers unit tests via GitHub actions, to help me no to push failing code by accident argumentum 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
argumentum Posted November 16 Share Posted November 16 #include "../au3pm/au3unit/Unit/assert.au3" "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\tests\arrayTest.au3"(6,24) : error: assertEquals(): undefined function. Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
genius257 Posted November 16 Author Share Posted November 16 (edited) 8 hours ago, argumentum said: #include "../au3pm/au3unit/Unit/assert.au3" "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\tests\arrayTest.au3"(6,24) : error: assertEquals(): undefined function. Oh no worries that is annoying but intentional 😅. the au3pm folder is the folder for my package manager au3pm. the au3pm.json (or au3pm-lock.json if available) file in a repository specifies the dependencies and the manager will resolve and download them to that folder. Every dependency except AutoIt will currently resolve to a commit hash or release on GitHub, so you could manually download the release and add it to that folder if you wanted You can see the steps my GitHub action script does, to make this work here: https://github.com/genius257/DllStructEx/blob/main/.github/workflows/test.yml#L26-L31 I've created a re-usable GitHub action that downlods the au3pm binary and then simple just runs the command(s) here: https://github.com/au3pm/au3pm-action/blob/main/action.yml Thread for the package manager: Edited November 16 by genius257 argumentum 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
argumentum Posted November 16 Share Posted November 16 5 hours ago, genius257 said: Oh no worries that is annoying but intentional 😅. the au3pm folder is the folder for my package manager au3pm. the au3pm.json ... , so you could manually download the release and add it to that folder if you wanted I did but no cigar. assertEquals() is not there. My expertise, in my many, many years of running scripts ( I'd say, am a legend ), is to load them and press F5. Other than that I feel quite useless. So I get the zip with the scripts and, ... Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
genius257 Posted November 16 Author Share Posted November 16 (edited) 6 hours ago, argumentum said: I did but no cigar. assertEquals() is not there. My expertise, in my many, many years of running scripts ( I'd say, am a legend ), is to load them and press F5. Other than that I feel quite useless. So I get the zip with the scripts and, ... Ah, i apologize. what i meant was to download the release for each of the dependencies, and their dependencies (basically manually resolving the dependency tree). But there is more steps for manually solving the dependencies. Since each dependency needs a linked folder to the parent folder (au3pm). The dependencies are currently not needed to run the main code, only the tests. If you wish to do it manually, you need the following steps: Add a new folder in the project, with the name "au3pm" download au3unit_v1.0.0, StringRegExpSplit_v1.0.0 and autoit_v3.3.16.1 extract each zip file to the au3pm folder rename the extracted "install" folder to "autoit" rename the extracted "au3unit-1.0.0" folder to "au3unit" rename the extracted "StringRegExpSplit-1.0.0" folder to "StringRegExpSplit" open up cmd.exe create a directory junction for au3unit with: mklink /J "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\au3pm\au3unit\au3pm\" "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\au3pm" create a directory junction for StringRegExpSplit with: mklink /J "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\au3pm\StringRegExpSplit\au3pm\" "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\au3pm" the unit tests should now work With the package manager it is: Download au3pm_v0.3.1 executable or build the exe manually open cmd.exe move working directory to the project via: cd /D "D:\Users\Tester\Downloads\au3.DllStructEx-2.0.0\DllStructEx-2.0.0\" install dependencies with: "D:\Users\Tester\Downloads\au3pm.exe" install the unit tests should now work Sadly i cannot upload a zip of my au3pm folder, as it is 31,7 MB in size and the directory junctions prevent archiving tools from working. Edited November 17 by genius257 Added link to executable argumentum 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now