Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/17/2025 in all areas

  1. Here's the pic from the first thread.... Imagine the first column of each number is a BYTE, with Most Significant Bit being 128, then 64, 32 16 8 4 2 1, we dont need the 128 as each number is only 7 imaginary bits tall, then the loop starts at the top left corner and reads the first bit, if it's lit it adds $value=64 to $code[0], if unlit nothing is added, then the next DllStructGetData reads the next number, and so on, when it gets to the end (last number) then $value is divided by 2 so it's 32 which is the next significant bit and the STEP in the loop goes to next line/bit, if it finds any lit bits it adds $value to $code, and so on.... The $code's now have values, which we then look up in the lookup table, like 114 is 5, the last in the lookup as it's the largest number, while 4 is located at 12'th place.
    2 points
  2. HAHA, major speed increase, we've been doing it wrong, we've been using _WinAPI_GetDC(0) all the time which is the whole desktop, when we should have been using _WinAPI_GetWindowDC() instead, it's now like 5 times faster for me as it went from the whole desktop @3440x1440 to the test gui I've been using @640x480, and speed increased dramatically. Changes to make... $hDDC = _WinAPI_GetDC(0) ;should be $hDDC = _WinAPI_GetWindowDC($tool) ;Change $posx and $posy to point at the correct spot, this is now not from the desktop 0,0 but from the tools.exe windows start position. So speed increase depends on the size of the tools.exe window, maybe you can even resize it to be smaller. Times i get now for full cycle with bitblt and all... 0.5085 0.5136 1.3745 0.5044 0.4402 0.4155 0.9733 Try it and report back with times, it's awesome.
    2 points
  3. Version 1.8.2 has just been released! I should have been 1.8.0, but issues with deployment pipeline after bigger changes to how the parser code and types are generated (internally) meant that i had to increment patch version 2 times, to successfully be able to release to the extension marketplaces. Notable changes: Added au3 DocBlock `@link` tag support Added syntax highlighting for au3 DocBlock and legacy UDF headers 2 things i would like feedback on, if possible: About the new syntax highlighting: Let me know if and/or how you like or dislike it. Performance: small changes to how the parser worked with some parser rules, to better generate types. Smaller tests indicated it was same or faster, but it can very much depend how it traverses through the code. Let me know if you notice any slow down, so I can look into fixing it ASAP! Feedback can be here, via an issue or via the discussion for the release.
    2 points
  4. And a small explainer on what @Werty is doing (I am off some pixels but I hope @Hashim get the concept as indicated by the red dots) Zoom in on the image to see the 28 pixels used for comparison and understanding why its important to have the screenshots exactly aligned.
    1 point
  5. 4 digits is 10.000 numbers, why try 1,000,000 times? Speed optimization. Why? In general its fun to try in AutoIt but if speed is needed switch to a compiled language _WinAPI_HashString($stringforDigit,false,2) to get a 2 byte hash, easier to compare, no clue if its faster Most likely a boundary issue? 88*32 =2816 pixels then it depends on the goal of the for loop to 2816 with step 440 if you want to hit 7 or 8 bits 1 441 881 1321 1761 2201 2602 (3003) Not sure if 7 or 8 bits make a difference in the first column of a digit. I assume 7 would be enough to have 4 digits in 28 comparisons In my example demo code I scale down to 8x8 bits Why dinner first? 😉 ...
    1 point
  6. It's actually including all four, the fourth is just only the first column of that number, as that is all we need. I'll see, as i promised in the other thread, about making a short tutorial/explanation of how it works, this time I promise I will get it done.....after dinner.
    1 point
  7. FYI, the sign function inside ntdll.dll : ConsoleWrite(_I32ToString(-5, 2) & @CRLF) Func _I32ToString($i, $base) Return DllCall("ntdll.dll", "str:cdecl", "_itoa", "int", $i, "str", "", "int", $base)[0] EndFunc
    1 point
  8. There is numerous converting functions inside ntdll.dll and msvcrt.dll (you can search for it). Here what you want to achieve very easily : ConsoleWrite(_Ui32ToString(0x87654321, 2) & @CRLF) ConsoleWrite(_Ui32ToString(2684354560, 2) & @CRLF) Func _Ui32ToString($i, $base) Return DllCall("ntdll.dll", "str:cdecl", "_ultoa", "ulong", $i, "str", "", "int", $base)[0] EndFunc
    1 point
  9. You need to cancel default behavior of the listview, that way : Case 25 ; left ConsoleWrite("left " & $iIndex[1] & @CRLF) If Mod($iIndex[1], 7) = 0 Then _GUICtrlListView_SetItemSelected($idListview, $iIndex[1] - 1, True, True) Return 1 EndIf
    1 point
×
×
  • Create New...