Leaderboard
Popular Content
Showing content with the highest reputation on 02/11/2025 in Posts
-
Good morning, I would love to contribute to either of the extensions. As I mentioned, I have been using VSCode with the Damian/Loganch extension for quite some time, and having the "Problems" tab really speeds up development. What do I love about the genius257 extension? IntelliSense is context-aware. So, if I am typing a variable, it lists everything that is valid in the current context. Combining the best features of both extensions would be amazing!2 points
-
Visual Studio Code Extension currently available and future plans for SciTE?
genius257 and one other reacted to argumentum for a topic
Am using both. Why, how, ..even added a "genius257.autoit3-debug". What am I doing ?, ..just F5 ( to run ) and clicking around. I tend to learn that way ..20 minutes later.. ok, I see that Damian has ">AutoIt: command" and if I remove it that's not there. I'll play around a bit more2 points -
Glad you found a solution. If you feel like donating, Just send it to AutoIt.2 points
-
Yes, I ended up removing the Do loop when I realised the same, it was useful to increase accuracy for previous versions of the script that would return nothing when nothing was recognised, but since these latest versions seem to fallback to returning 0000 or 1111 for unrecognised numbers it's no longer necessary. Thanks for the optimisation tips, I knew writing to the file each time was slow but didn't know of a better way to do it, I'll convert it to use an array instead.1 point
-
I would also recommend writing the results to an array and then just use FileWriteFromArray() once after the loop, you are filewriting a million times as it is now, which may be a major bottleneck. This is NOT tested, just to give an idea. $hDDC = _WinAPI_GetDC(0) $hCDC = _WinAPI_CreateCompatibleDC($hDDC) $hBmp = _WinAPI_CreateCompatibleBitmap($hDDC, 88, 32) _WinAPI_SelectObject($hCDC, $hBmp) Local $Array[1000000] For $loop = 0 To 999999 $serial = StringFormat('%06i', $loop) ControlClick($tool, "", "TTabSheet1", "primary", 1, 100, 100) _WinAPI_BitBlt($hCDC, 0, 0, 88, 32, $hDDC, $posx, $posy, 0x00CC0020) $Array[$loop] = GetNumber($result); you probably need to add the serial here also Next _WinAPI_DeleteDC($hCDC) _FileWriteFromArray($db, $Array)1 point
-
Thanks for the nice words, glad you liked it, you can donate to AutoIt I noticed in the script you posted that you call these 5 lines a million times, you only need to call them once, bitblt just reuses them, so place them outside the loop... $hDDC = _WinAPI_GetDC(0) $hCDC = _WinAPI_CreateCompatibleDC($hDDC) $hBmp = _WinAPI_CreateCompatibleBitmap($hDDC, 88, 32) _WinAPI_SelectObject($hCDC, $hBmp) _WinAPI_DeleteDC($hCDC) $hDDC = _WinAPI_GetDC(0) $hCDC = _WinAPI_CreateCompatibleDC($hDDC) $hBmp = _WinAPI_CreateCompatibleBitmap($hDDC, 88, 32) _WinAPI_SelectObject($hCDC, $hBmp) For $loop = 0 To 999999 Do $serial = StringFormat('%06i', $loop) ControlClick($tool, "", "TTabSheet1", "primary", 1, 100, 100) _WinAPI_BitBlt($hCDC, 0, 0, 88, 32, $hDDC, $posx, $posy, 0x00CC0020) $result = GetNumber($result) Until ((StringLen($result) = 4) and StringIsDigit($result)) FileWrite($db, $serial & "," & $result & @LF) Next _WinAPI_DeleteDC($hCDC) That should speed things up a bit. Also, what is the reason for the Do-Until, getnumber($result) always returns 4 digits so I dont see a need to wait for them or check if they are digits, they always are, so your loop should/could look something like this... $hDDC = _WinAPI_GetDC(0) $hCDC = _WinAPI_CreateCompatibleDC($hDDC) $hBmp = _WinAPI_CreateCompatibleBitmap($hDDC, 88, 32) _WinAPI_SelectObject($hCDC, $hBmp) For $loop = 0 To 999999 $serial = StringFormat('%06i', $loop) ControlClick($tool, "", "TTabSheet1", "primary", 1, 100, 100) _WinAPI_BitBlt($hCDC, 0, 0, 88, 32, $hDDC, $posx, $posy, 0x00CC0020) $result = GetNumber($result) FileWrite($db, $serial & "," & $result & @LF) Next _WinAPI_DeleteDC($hCDC) Dont know if I'm overlooking something.1 point
-
Run binary
argumentum reacted to Damnatio for a topic
Okay, I just took a "deeper" look into the ntdll and compared two version (2894 and 3037). In both versions is an exported function called "RtlEqualUnicodeString" 0x310 bytes away from "RtlpInsertOrRemoveScpCfgFunctionTable". So to make your code work dynamic with older and newest build of 24H2 you can simply grab the offset of "RtlEqualUnicodeString" by using _WinAPI_GetProcAddress and then add 0x310 bytes to that offset. Like this: #Region 12 FIX NTDLL for Win11 24H2 $WinVer = RegRead("HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion", "DisplayVersion") If $WinVer = "24H2" Then $ntdllbase = _WinAPI_GetModuleHandle("ntdll.dll") $ZwManageHotPatch = _WinAPI_GetProcAddress($ntdllbase, "ZwManageHotPatch") $RtlEqualUnicodeString = _WinAPI_GetProcAddress($ntdllbase, "RtlEqualUnicodeString") $RtlpInsertOrRemoveScpCfgFunctionTable = $RtlEqualUnicodeString + 0x310 $bPatch = 0xC3C03148 $pBuf = DllStructCreate("byte[4]") DllStructSetData($pBuf, 1, $bPatch) $aCall = DllCall("kernel32.dll", "bool", _RunBinary_LeanAndMean(), _ "handle", $hProcess, _ "ptr", $ZwManageHotPatch, _ "ptr", DllStructGetPtr($pBuf), _ "dword_ptr", DllStructGetSize($pBuf), _ "dword_ptr*", 0) ; Check for errors or failure If @error Or Not $aCall[0] Then DllCall("kernel32.dll", "bool", "TerminateProcess", "handle", $hProcess, "dword", 0) Return SetError(12, 0, 0) ; failure while changing ntdll EndIf $aCall = DllCall("kernel32.dll", "bool", _RunBinary_LeanAndMean(), _ "handle", $hProcess, _ "ptr", $RtlpInsertOrRemoveScpCfgFunctionTable, _ "ptr", DllStructGetPtr($pBuf), _ "dword_ptr", DllStructGetSize($pBuf), _ "dword_ptr*", 0) ; Check for errors or failure If @error Or Not $aCall[0] Then DllCall("kernel32.dll", "bool", "TerminateProcess", "handle", $hProcess, "dword", 0) Return SetError(12, 0, 0) ; failure while changing ntdll EndIf EndIf #EndRegion 12 FIX NTDLL for Win11 24H21 point -
1 point
-
Visual Studio Code Extension currently available and future plans for SciTE?
argumentum reacted to genius257 for a topic
So I'm assuming that you are using Damien.autoit, because my extension does not have the trace add functionality. As for double clicking in vscode, i suspect you want to use ctrl+click or right click and choose "Go to Definition" (you can also use F12 to goto definition if your caret is on a function call or variable)1 point -
In general I mean the scripts one would put in the "PersonalTools.lua" script (found in C:\Users\Name\AppData\Local\AutoIt v3\SciTE), and assign a hotkey for in SciTEUser.properties, to call in Scite. Generally where you are able to tie into the editor, get the current selected word, etc. Specifically, for one, I have a tool that scans a script for func declarations and lists each func name in a specific spot at the top, in the order found (For UDF header lists). Thanks for the suggestions.1 point
-
I'm not familiar with what kind of custom LUA scripts you're referring to, but i really depends on the task required. The solutions could be one or a combination of: vscode features, existing extensions, external CLI tools or you own custom extension.1 point
-
Just checked the latest LUA code I posted in the previous available SciTE5-with-DynamicFunctions directory, and there are no changes with the current Beta installer in the AutoItTools.lua file (other that the comment changes I have reverted. So could it be that this is an oops that is made longer ago? EDIT: I will merge it back in and this time in the proper version of AutoItTools.lua and put in the next version of the installer before release. EDIT2: Merged your changes again into AutoItTools.lua and created an updated Beta installer v25.205.1420.1. It only contains changes for SciTE: Merged the Header changes from you Updated The scanning through the *.au3 in the Dynamic LUA code so it can handle filenames containing a special character. Changed AutoitWrapper to avoid getting a Set HotKeys error in case they are set to Blank. Jos1 point
-
Hi all, I just wanted to write about the current WIP release and future extension plans. For the 1.8 release: For anyone interested in the new DocBlock format, I've implemented support for @link tags, both as a stand alone tag and inline tag. I also plan to implement syntax highlighting for both DockBlock format and the legacy UDF format. I've been busy working on issues with the parser and auto-generated typescript types. This is, and my AutoIt3 parser in AutoIt3 project are the reason for the slow release of 1.8. When i resolve the last issues with type generation, i will finish and release 1.8! 🙂 For future releases: The function signature helper for parameters in functions is currently too flaky for me, and i will spend time to try and improve the experience. I will look into partial code AST object updates with the parser. I am not 100% sure how well i will be able to implement it, but i hope to improve performance when working in big script files. I want to add a static typing to functions and variables. Type hinting or casting will be supported via a new comment syntax. Built-in functions and variables will be supported right away, when typing resolution is released. This should help with general development and allow warnings with for example, when doing implicit variable type casting via operators. I also want to implement a formatter/linter. For now, the plan is to add it to this extension, but may end up being it's own thing, depending on configuration complexity and performance overhead. Also, completion suggestions for DllStruct object members. DllStruct's (and maybe some COM objects) will be analyzed and allow completion suggestions and errors for use of non existing members. This MAY also include Map and Array objects, but it is unclear how easy it will be to infer size and members of those. And finally for now, syntax highlighting and attempted analysis of strings given to Eval, Execute and Assign. I cannot guarantee all will be implemented. Most will be exploratory implementations when the time comes, but hopefully it will result in the best editor experience i can offer!1 point
-
Top of your script: $RunningTime = TimerInit() End of your script (before exit) MsgBox(0, "Running Time", TimerDiff($RunningTime)/1000&" seconds") You better start reading the Help file1 point