Leaderboard
Popular Content
Showing content with the highest reputation on 03/23/2024 in all areas
-
[SOLVED] Default choice in list
argumentum and 2 others reacted to Andreik for a topic
Your last 10 threads contains scripts that doesn't even run. It looks like you are not here to learn anything. Your header files are missing, you use undefined functions, etc...3 points -
Hello. Modify this code. Check for the window's Process. play with it get the text, hide it, click it etc. Saludos1 point
-
try with Global $FILE_Summary[500][2]1 point
-
1 point
-
As discussed here: I created a DLL (x86 and x64) to do a file compare like the FC.exe does (only binary comparison!) but filling up the memory which can be read out by Autoit. UDF _WinAPI_FileCompare.au3: ;Version v0.70 build 2024-03-23 beta #include-once ; #FUNCTION# ==================================================================================================================== ; Name ..........: _WinAPI_FileCompareBinaryString ; Description ...: Reads two files into the memory and compares them byte by byte. Result is saved in the memory. ; Syntax ........: _WinAPI_FileCompareBinaryString($sFile1, $sFile2, Byref $tMemArray) ; Parameters ....: $sFile1 - first file to read. ; $sFile2 - second file to read. ; $tMemArray - a ptr dll struct which holds a ptr entry which is filled by the DLL. ; Return values .: Number of unequal bytes found in both files otherwise negative value on error. ; Author ........: UEZ ; Modified ......: ; Remarks .......: The memory pointer $tMemArray must be released using _MemGlobalFree() which holds the pointer to the result. ; The result contains hex string values (offset, file1, file2) from the differences between the two files. ; Large memory consumption for files > 80 MB as everything is kept in memory! ; Related .......: ; Link ..........: https://www.autoitscript.com/forum/index.php?showtopic=211619 ; Example .......: No ; =============================================================================================================================== Func _WinAPI_FileCompareBinaryString($sFile1, $sFile2, ByRef $tMemArray) If Not FileExists($sFile1) Then Return SetError(-10, 0, 0) If Not FileExists($sFile2) Then Return SetError(-20, 0, 0) If Not FileGetSize($sFile1) Then Return SetError(-30, 0, 0) If Not FileGetSize($sFile2) Then Return SetError(-40, 0, 0) If Not IsDllStruct($tMemArray) Then Return SetError(-50, 0, 0) Local $aReturn = DllCall(@AutoItX64 ? "_WinAPI_FileCompare_x64.dll" : "_WinAPI_FileCompare.dll", "int64", "_WinAPI_FileCompareBinaryString", "str", $sFile1, "str", $sFile2, "struct*", $tMemArray) If @error Then Return SetError(-60, 0, 0) If $aReturn[0] < 0 Then SetError($aReturn[0], 0, 0) Return $aReturn[0] EndFunc ;==>_WinAPI_FileCompareBinaryString ; #FUNCTION# ==================================================================================================================== ; Name ..........: _WinAPI_FileCompareBinary ; Description ...: Reads two files into the memory and compares them byte by byte. Result is saved in the memory. ; Syntax ........: _WinAPI_FileCompareBinary($sFile1, $sFile2, Byref $tMemArray) ; Parameters ....: $sFile1 - first file to read. ; $sFile2 - second file to read. ; $tMemArray - a ptr dll struct which holds a ptr entry which is filled by the DLL. ; Return values .: Number of unequal bytes found in both files otherwise negative value on error. ; Author ........: UEZ ; Modified ......: ; Remarks .......: The memory pointer $tMemArray must be released using _MemGlobalFree() which holds the pointer to the result. ; The result contains integer values (offset, file1, file2) from the differences between the two files. ; Large memory consumption as everything is kept in memory but 1/3 less than _WinAPI_FileCompareBinaryString. ; Related .......: ; Link ..........: https://www.autoitscript.com/forum/index.php?showtopic=211619 ; Example .......: No ; =============================================================================================================================== Func _WinAPI_FileCompareBinary($sFile1, $sFile2, ByRef $tMemArray) If Not FileExists($sFile1) Then Return SetError(-10, 0, 0) If Not FileExists($sFile2) Then Return SetError(-20, 0, 0) If Not FileGetSize($sFile1) Then Return SetError(-30, 0, 0) If Not FileGetSize($sFile2) Then Return SetError(-40, 0, 0) If Not IsDllStruct($tMemArray) Then Return SetError(-50, 0, 0) Local $aReturn = DllCall(@AutoItX64 ? "_WinAPI_FileCompare_x64.dll" : "_WinAPI_FileCompare.dll", "int64", "_WinAPI_FileCompareBinary", "str", $sFile1, "str", $sFile2, "struct*", $tMemArray) If @error Then Return SetError(-60, 0, 0) If $aReturn[0] < 0 Then SetError($aReturn[0], 0, 0) Return $aReturn[0] EndFunc ;==>_WinAPI_FileCompareBinary ; #FUNCTION# ==================================================================================================================== ; Name ..........: _WinAPI_FileComparePrint ; Description ...: Reads two files into the memory and compares them byte by byte. Result will be printed to the console only. ; Syntax ........: _WinAPI_FileComparePrint($sFile1, $sFile2[, $bUnbuffered = False]) ; Parameters ....: $sFile1 - first file to read. ; $sFile2 - second file to read. ; $bUnbuffered - [optional] a boolean value. Default is False. If $bUnbuffered then file will be read ; byte by byte and result will be displayed, otherwise both files will be read into the ; memory and then compared. ; Return values .: 1 if successfull, otherwise 0. ; Author ........: UEZ ; Modified ......: ; Remarks .......: Use #AutoIt3Wrapper_Change2CUI=y when compiling to display result in console. ; Related .......: ; Link ..........: https://www.autoitscript.com/forum/index.php?showtopic=211619 ; Example .......: No ; =============================================================================================================================== Func _WinAPI_FileComparePrint($sFile1, $sFile2, $bUnbuffered = False) If Not FileExists($sFile1) Then Return SetError(-10, 0, 0) If Not FileExists($sFile2) Then Return SetError(-20, 0, 0) If Not FileGetSize($sFile1) Then Return SetError(-30, 0, 0) If Not FileGetSize($sFile2) Then Return SetError(-40, 0, 0) DllCall(@AutoItX64 ? "_WinAPI_FileCompare_x64.dll" : "_WinAPI_FileCompare.dll", "none", "_WinAPI_FileComparePrint", "str", $sFile1, "str", $sFile2, "bool", $bUnbuffered) If @error Then Return SetError(-60, 0, 0) Return 1 EndFunc ;==>_WinAPI_FileComparePrint Func _WinAPI_FileCompareAbout() DllCall(@AutoItX64 ? "_WinAPI_FileCompare_x64.dll" : "_WinAPI_FileCompare.dll", "none", "About") EndFunc ;==>_WinAPI_FileCompareAbout Example1: ;Coded by UEZ build 2024-03-22 beta #AutoIt3Wrapper_UseX64=y #include <WinAPIFiles.au3> #include <Memory.au3> #include "_WinAPI_FileCompare.au3" Global $tMemArray = DllStructCreate("ptr addr") Global $fTimer = TimerInit() Global $iReturn = _WinAPI_FileCompareBinaryString("img1.bmp", "img2.bmp", $tMemArray) ConsoleWrite("Dll runtime: " & TimerDiff($fTimer) & " ms" & @CRLF) If $iReturn Then If _WinAPI_IsBadReadPtr($tMemArray.addr, $iReturn) <> 1 Then ConsoleWrite(@CRLF) ConsoleWrite("Displaying result..." & @CRLF) ConsoleWrite("Offset" & @TAB & @TAB & "File1" & @TAB & "File2" & @CRLF) Global $i, $j, $t, $c = 0 For $i = 0 To $iReturn For $j = 0 To 2 $t = DllStructCreate("char string[15]", Ptr($tMemArray.addr + $i * 15 + ($j = 0 ? $j : 6 + $j * 3))) ConsoleWrite($t.string & ($j = 0 ? ":" : "") & @TAB) Next $c += 1 ConsoleWrite(@CRLF) Next ConsoleWrite(@CRLF) ConsoleWrite("Found " & $c & " differences!" & @CRLF) ConsoleWrite(@CRLF) If $tMemArray.addr Then _MemGlobalFree($tMemArray.addr) Else ConsoleWrite("Access violation to memory address" & @CRLF) EndIf Else ConsoleWrite("Files are equal!" & @CRLF) EndIf Example2: ;Coded by UEZ build 2024-03-22 beta #AutoIt3Wrapper_UseX64=y #include <WinAPIFiles.au3> #include <Memory.au3> #include "_WinAPI_FileCompare.au3" Global $tMemArray = DllStructCreate("ptr addr") Global $fTimer = TimerInit() Global $iReturn = _WinAPI_FileCompareBinary("img1.bmp", "img2.bmp", $tMemArray) ConsoleWrite("Dll runtime: " & TimerDiff($fTimer) & " ms" & @CRLF) If $iReturn Then If _WinAPI_IsBadReadPtr($tMemArray.addr, $iReturn) <> 1 Then ConsoleWrite(@CRLF) ConsoleWrite("Displaying result..." & @CRLF) ConsoleWrite("Offset" & @TAB & @TAB & "File1" & @TAB & "File2" & @CRLF) Global $i, $j, $t, $c = 0 For $i = 0 To $iReturn For $j = 0 To 2 Switch $j Case 0 $t = DllStructCreate("ulong offset", Ptr($tMemArray.addr + $i * 8)) ConsoleWrite(Hex($t.offset, 8) & ":" & @TAB) Case 1 $t = DllStructCreate("ubyte hex1", Ptr($tMemArray.addr + $i * 8 + 4)) ConsoleWrite(Hex($t.hex1, 2) & @TAB) Case 2 $t = DllStructCreate("ubyte hex2", Ptr($tMemArray.addr + $i * 8 + 5)) ConsoleWrite(Hex($t.hex2, 2) & @TAB) EndSwitch Next $c += 1 ConsoleWrite(@CRLF) Next ConsoleWrite(@CRLF) ConsoleWrite("Found " & $c & " differences!" & @CRLF) ConsoleWrite(@CRLF) If $tMemArray.addr Then _MemGlobalFree($tMemArray.addr) Else ConsoleWrite("Access violation to memory address" & @CRLF) EndIf Else ConsoleWrite("Files are equal!" & @CRLF) EndIf Example3: ;Coded by UEZ build 2024-03-22 beta #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Change2CUI=y #include "_WinAPI_FileCompare.au3" _WinAPI_FileComparePrint("img1.bmp", "img2.bmp") I used the two images from here: Examples output should look like this here (always hex values): Dll runtime: 5.6315 ms Displaying result... Offset File1 File2 0009AB99: F0 C7 0009AB9A: EF CB 0009AB9B: 81 34 0009C795: 23 00 0009C796: 7C 80 0009C797: F5 FF Found 6 differences! You can read out the result and put it to an array... With this version you should be able to use multi-threading / multi-calls of the DLL as the memory is now allocated with each call. For x86 it may fail when the memory cannot be allocated (2GB limit) and the dll will return 0. I may add another feature to the DLL to get around the x86 limitation at the expense of speed by using chunked memory allocation if it makes sense... All files can be found also in the 7-Zip archive. _WinAPI_FileCompare DLL v0.70 build 2024-03-22.7z1 point
-
AutoItHelp v3.3.16.1 with external CSS loading
bladem2003 reacted to argumentum for a topic
https://github.com/niivu/Windows-10-themes/tree/main/BIB31 point -
A.Percy built the first Au3Irrlicht by writing an AutoIt plugin wrapper around the object oriented 3D library called Irrlicht. He quickly encountered difficulties in handling arrays and other structures from the AutoIt side of things, which restricted the flexibility of the library. Since then, I've been looking for a solution that would allow us to utilize all the functionality of Irrlicht, without the restrictions imposed by plugins. This is the result. Since 2006, Frank Dodd of the Freebasic community has been writing an Irrlicht wrapper for imperative languages. It started similar to Au3Irrlicht, but has one advantage - instead of plugin functions, we can use DllCall. That translates into unrestricted access of Irrlicht for AutoIt. There are 299 functions, and for the last several weeks I've been wrapping each with a DllCall for use by AutoIt. Features Overview: Mesh/Node: General Animation (bone based and mesh morphing), child/parent tree manipulation, Special animator types (circle, spline, flystraight)Scene: Node management, Octtree, collision optimization, Save/Load using IrrEdit2D: Billboards, Sprites, RenderToTextureTerrain: Tiled Terrain manager (paging terrains), Spherical Terrains, configurable LoD and zone managerEnvironmental effects: Fog, Grass, Wind, Gravity, Water, Clouds, Skyboxes and SkydomesSpecial Effects: Particles, Emitters, Mesh Emitters, Lens Flare, Advanced shaders, Dynamic lights and shadowsGUI: Image, EditBox, ListBox, Window, Text, IrrFontsAs of this release, 291 are wrapped. I will be recommending and/or implementing the unique functionality created by A.Percy for the IrrlichtWrapper. Huge Thanks to A.Percy and all the rest who've made this possible! They've done amazing work, and I'm glad to have been able to use their work and experience to make this wrapper. This definitely exemplifies the idea of standing on the shoulders of giants. Thanks guys! Download the code and examples here: http://code.google.com/p/au3irrlicht2/downloads/list Let me know if you want to contribute and I will assign you as a contributor to the code project. Much thanks to Linus for his contributions and drive!1 point
-
OpenGL
LKP reacted to WesleyThomas for a topic
Since struggling with writing some OpenGL stuff in autoit due to the fact of me being newish to the whole programming game and the fact that I really don't have a clue on how to write or use plugins, I thought I would share some of my code I have made that demonstrates using OpenGL with purely autoit and dll calls directly with opengl32 and glu32. I have made a start writing a GLConstants.au3 and GLFunctions.au3 files that I think should be a standard library by now in the Autoit Include folder. Any feedback would be nice Right clicking on the GUI moves the Camera around (while holding), w and s moves forward/backward and a and d spins left and right. Enjoy GLConstants.au3 GLFunctions.au3 3D Viewport.au31 point -
OpenGL
LKP reacted to WesleyThomas for a topic
Been hard at work and got a few more functions and features down. Added smoothed points so they appear as circles, put a line stipple on which gives a dashed appearence to lines, but the main feature I have got working is the VertexArrays features which enable editing of Vertices on the fly. This can also be used for colour, surface normals, texture coordinates, and such, but at the moment only I have only put an example of Vertex Coordinate editing. Just to warn I have not been adding error checking. I have been writing a basic model editing program for quite a while and have been avoiding tackling OpenGL. Unfortunatley you are limited with GDI+ as it is so slow., just a few hundred vertices and you are looking at seconds per frame, not frames per second. When I was adding and debugging the VertexArray functions I tested a structure of 1 million float variables which would allocate 333,333 vertices and frames per second are still great. I will update the GLFunctions/Constants files above and add the new examples. I have started to add a few more lines in to explain but I'm mainly researching and testing things out when I get the time, which is limited with a baby in the house. My next area of investigation is going to be tackling how to selected a vertex, or picking as it's known. Im not sure how or if it can be done while using VertexArray but I'm guessing it can. 1M verts test.au3 Vertex Array Animation.au3 Not sure how to edit my first post so I will add the functions and constants below... ;DataType enum: Global Const $GL_BYTE = 0x1400 Global Const $GL_UNSIGNED_BYTE = 0x1401 Global Const $GL_SHORT = 0x1402 Global Const $GL_UNSIGNED_SHORT = 0x1403 Global Const $GL_INT = 0x1404 Global Const $GL_UNSIGNED_INT = 0x1405 Global Const $GL_FLOAT = 0x1406 Global Const $GL_2_BYTES = 0x1407 Global Const $GL_3_BYTES = 0x1408 Global Const $GL_4_BYTES = 0x1409 Global Const $GL_DOUBLE = 0x140A Global Const $GL_DOUBLE_EXT = 0x140A Func GLDisableClientState($iCap) DllCall($hOPENGL32, "none", "glDisableClientState", "uint", $iCap) EndFunc ;==>GLDisableClientState Func GLEnableClientState($iCap) DllCall($hOPENGL32, "none", "glEnableClientState", "uint", $iCap) EndFunc Func GLDrawArrays($iMode, $iFirst, $iCount) DllCall($hOPENGL32, "none", "glDrawArrays", "uint", $iMode, "uint", $iFirst, "uint", $iCount) EndFunc ;==>GLDrawArrays Func GLVertexPointer($iSize, $iType, $iStride, $aPtr) DllCall($hOPENGL32, "none", "glVertexPointer", "uint", $iSize, "uint", $iType, "int", $iStride, "ptr", $aPtr) EndFunc Func GLLineStipple($iFactor, $iPattern) DllCall($hOPENGL32, "none", "glLineStipple", "int", $iFactor, "ushort", $iPattern) EndFunc ;==>GLLineStipple Func GLLineWidth($fWidth) DllCall($hOPENGL32, "none", "glLineWidth", "float", $fWidth) EndFunc ;==>GLLineWidth Func GLPolygonStipple($iMask) DllCall($hOPENGL32, "none", "glPolygonStipple", "ubyte*", $iMask) EndFunc ;==>GLPolygonStipple1 point