Leaderboard
Popular Content
Showing content with the highest reputation on 02/04/2025 in all areas
-
Visual Studio Code Extension currently available and future plans for SciTE?
jaberwacky and 4 others reacted to Jos for a topic
All, I see that there are multiple efforts to create/maintain an AutoIt3 Visual Studio Code extension, and I would like to open a discussion to see how that can be streamlined/merged/done more effectively so we can come up with the one that's preferred. I have been toying with the idea to stop the development of all the LUA extra's used by SciTE and start using VSCode for the more advanced way of developing AutoIt3 scripts, as many things a way after when the extension supports it, like running au3check on save so you just click the problems tab to see the warnings/errors of the currently opened scripts. So I have been working on making the utilities packaged with SciTE4AutoIt3 suitable to run stand-alone without the need for wrapping them with AutoIt3Wrapper, with the plan to be able to make them all more generic usable for any editor. They need to support UTF8 & ANSI encoded files, even when through includes the encoding is mixed. I have modified AutoIt3Wrapper to stop renaming and changing encoding of script/include files, and updated Tidy/Au3check/Au3stripper to support special characters in filenames and mixed ANSI/UTF8 file encoding and the generated console output is UTF8. I have been toying a bit with the VSCODE extension maintained by Damian (just picked one without looking at any others) and made some modifications locally for testing. Run au3check (Ctrl+F5), Tidy (Ctrl+t), Au3Stripper (Ctrl+Shift+o) without using AutoIt3Wrapper. Other already standardly available option (Run/Compile) still run via AutoIt3Wrapper as there is an added value doing it that way. I really like what I see and think this is a good way forward. So... I like to hear how you all think about this and possibly your preferred VSCode autoIt3 extension with reasons why. Also feels as a waste of effort when so many are making their own version of an extension instead of bundling the effort making one really nice one with all required features. Thoughts/Opinions?5 points -
Visual Studio Code Extension currently available and future plans for SciTE?
seadoggie01 and 2 others reacted to SOLVE-SMART for a topic
Many thanks to everyone, especially to @genius257 for your well written assessment and your explanation 👌 . A few pros and cons were already mentioned which is great. I really looking forward to @LoganCHs opinion and to his statements about his VSCode extension (origin by Damien, "damien.autoit"). I believe he is pretty busy and maybe cannot work on the extension much more. At least that's my impression over the last few months or maybe even the last two years. The GitHub "issue" area is relatively full and only a few of the requests were processed promptly. 💡 Important: This is really not meant to be a criticism, as I really enjoy working with VSCode with the extension, it's just an statement. Hence the question of how he sees the future in this regard or if he would like support with further development. Best regards Sven3 points -
I did originally use the Damien.autoit extension in vscode myself, and found issues I wanted to fix via pull requests. But after looking at the usage of regular expression and the reliance on AutoIt executables (nothing wrong with that as such, I mean it works), I wanted to try a entirely different approach. I started implementing my own extension after I experienced inconsistent behavior from the Damien.autoit version. For example: sometimes the suggestions did not work as expected, with no error messages. I was also working on a AutoIt parser in Pegjs grammer syntax (now Peggyjs) and saw it as the perfect opportunity for testing it's capabilities. My extension does not depend on any files from AutoIt installations, and therefore works in web (test here: https://vscode.dev/) and on on non windows environments, like Linux (I use Ubuntu from time to time). The Damien.autoit extension uses regular expressions to parse the file (for completions and such), where I use my parser as mentioned before. My extension also runs via LSP, Damien.autoit does not. There are also small differences like incorrect syntax highlighting for nested comments on the Damien.autoit extension (this issue can be fixed by looking at my tmLanguage implementation). Try this between the two extensions as an example: #cs #cs #cs #ce #ce #ce $a To be clear I am not saying my extension is superior. My extension is currently slower at parsing scripts, the parser i am using/developing is in active development and incomplete (with code blocks are currently not implemented) and since I don't use AutoIt executables for error checking there is currenly little to no error checking, besides the syntax check (and recently error messages for include statements that fail to resolve). This also means that to run AutoIt scripts with my extension, a secondary extension is needed (https://marketplace.visualstudio.com/items?itemName=genius257.autoit3-debug) My extension is also made to move towards what I want for the AutoIt development experience. This means support for a new, more standardized doc-block way of documenting function and variable declarations. The standard UDF documentation format is supported for backwards compatibility, but is currently not great, and will only ever be implemented by me to "good enough" standard. I am unsure what you mean by "azure" dependencies? The only azure i am using that i know of, is for auto deploying to vscode extension marketplace and Open VSX Registry automatically, when a new release is created on GitHub, via GitHub actions?3 points
-
Visual Studio Code Extension currently available and future plans for SciTE?
IronFine and 2 others reacted to argumentum for a topic
Love SciTE. Don't understand VSCode. Tried for over an hour and, love SciTE4AutoIt3. Now, VSCode is an editor and I should be able to get used to it. If an extension removes the need for having to maintain all these utilities + a full fledged editor, I guess is a solution for that. And people abroad are very familiar with it ( VSCode ) so, it would not be a bad idea. Did I say that I love SciTE4AutoIt3 ?..., yes I did. And like @IronFine, is all I used for AutoIt since 2005. VSCode would be an interesting move for me.3 points -
Visual Studio Code Extension currently available and future plans for SciTE?
genius257 and one other reacted to WildByDesign for a topic
I think that this is a great idea. My productivity is much higher in VSCode. I have used the AutoIt extension from genius257 for about a year now. When working with AutoIt code, I always have the Au3 files open in SciTE4AutoIt3 and VSCode at the same time and continuously switching back and forth. For doing things such as large numbers of Search/Replace, VSCode is far superior here. Just the Search/Replace functionality alone is quite significant of a difference. I would imagine that maintaining the old code from SciTE4AutoIt3 is also likely cumbersome. This thread made my day.2 points -
Visual Studio Code Extension currently available and future plans for SciTE?
genius257 and one other reacted to argumentum for a topic
I'd say that am new to it but to be frank, am a step behind new I saw in "package-lock.json" a bunch of "@azure" entries and the other repo. does not have those entries, hence my assumption. Saw a bunch of arm(CPU) entries and imagined that "he is coding in a raspberryPi AutoIt via Azure Extensions, interesting" but is just my imagination as I see now. Maybe I should write "Mr.Robot v2.0, the re-incarnation" given my dream like, tech-fy brain2 points -
Visual Studio Code Extension currently available and future plans for SciTE?
SOLVE-SMART and one other reacted to ValentinM for a topic
I’ve been using PhpStorm and VSCode for a few years now, and I couldn't get used to SciTE (although I use it occasionally because of its lightweight nature). That’s why I managed to make things work with @genius257's extension, as Damien’s version was old (not updated since a long time when I tried it) and highlighting all our base code in red (since we’re using OOP and multiple files in my team). The extension fits my needs perfectly. Additionally, I developed my own extension to open the AutoIt Help when I press a shortcut, with the function under the cursor automatically selected in the Help GUI. I also released an update today (what a coincidence !) to support UDF .chm files: AutoIt Tools (not a big work as a debugger, but I needed it). EDIT : (add) -> I managed to use VSCode's tasks, preLaunchTasks and launch settings to automatically start Au3Check before compiling so I have no issues.2 points -
Visual Studio Code Extension currently available and future plans for SciTE?
SOLVE-SMART and one other reacted to seadoggie01 for a topic
While I've been moving away from using AutoIt lately, I started using Visual Studio Extensions about a year ago. I started with Damien/LoganCH's extension because it was the only available option at the time (I think). That said, there were a few issues (I think mostly Code Folding issue #89 - that's still open) with it at the time that caused me to start using genius's extension as soon as it came out. It was slightly choppy at the start, but considering my reduced usage of AutoIt, it's been fairly smooth sailing. Lately, I can't find a single issue with it despite it being "less mature" But I also use AutoIt for fairly simple things now like making a GUI wrapper for a command line program written in C#. Perhaps the other thing to consider is that LoganCH's extension requires the full SciTE install to function, per the ReadMe Obviously I'm biased; I don't want to change my extension2 points -
Thanks for your detailed views! I wasn't referring to forks, just the fact that there are multiple published extensions for Autoi3. I made my own fork for testing, as I wanted to add the direct execution of Tidy, Au3Check and Au3stripper into the extension without running AutoIt3Wrapper and using the same shortcuts as currently within SciTE4AutoIt3. Really wondering why @genius257 decided to start his own version and what are the Pros & Cons of either version. In general, I do not have the desire to "take any lead" or "take over" any of these project, just like to support one of them with the utilities I developed over the years to support one of these projects. When the outcome is that the 2 separate extensions remain, that is fine with me too, but I will only select one to use and possibly support with pull requests. So what are the differences between these 2 projects, and what makes the one better than the other? (Positive comments please and no pissing contest! )2 points
-
WebDriver: I can't find an element with h1 title
ioa747 and one other reacted to SOLVE-SMART for a topic
Hi @taylansan 👋 , please notice ⚠I assume such a structure: you use _WD_FindElement() in the multi element way. The fifth parameter is set to true which means you want to get all occurences of the <h1> elements (with the specific text). 1. Either you change your XPath to only search the first element like (//h1[contains(text(),'Welcome to BSS')])[1] or 2. simply set false as fifth parameter _WD_FindElement($sSession, $mConfig.LocatorStrategy, $sSelector, Default, False) or 3, without the fifth parameter because the default value is false _WD_FindElement($sSession, $mConfig.LocatorStrategy, $sSelector, Default) ... and try again 🙂 . ----------------------------------------- ⚠In case you are searching within an iframe, you first have to enter the frame and do your locator strategy (search) their. Func _EnterIFrame($sSelector) _WD_FrameEnter($sSession, _FindElement($sSelector)) EndFunc Best regards Sven2 points -
Run binary
argumentum reacted to Damnatio for a topic
In case someone needs fix for the newest Windows 11 24H2 10.0.26100.3037 build.. The functions you have to patch are named "ZwManageHotPatch" and "RtlpInsertOrRemoveScpCfgFunctionTable", The offset of "ZwManageHotPatch" can be grabbed by using GetProcAddress, the other function doesnt get exported sadly, so you have to hardcode that offset or find a workaround... Im doing it like that now: #Region 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") $WinBuild = StringReplace(FileGetVersion(@WindowsDir & "\system32\ntoskrnl.exe"), ".", "") $RtlpInsertOrRemoveScpCfgFunctionTable = 0x7BE0 If Number($WinBuild) > 100261002894 Then $RtlpInsertOrRemoveScpCfgFunctionTable = 0x5610 $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", $ntdllbase + $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 FIX NTDLL for Win11 24H2 Enjoy..1 point -
Visual Studio Code Extension currently available and future plans for SciTE?
argumentum reacted to genius257 for a topic
No worries I was just wondering if I'd accidentally added something Never look at the lock file The lock file is the entire resolved dependency tree, whereas the normal package.json contains the list of dependencies directly related to the project the azure dependencies are used by "@vscode/vsce" (https://github.com/genius257/vscode-autoit/blob/master/package-lock.json#L1900) and the "@vscode/vsce" is listed as a dev-dependency (https://github.com/genius257/vscode-autoit/blob/master/package.json#L149)1 point -
WebDriver: I can't find an element with h1 title
SOLVE-SMART reacted to taylansan for a topic
That was.. really good explanation. Thank you1 point -
I am happy to report that I have implemented a smooth and infinite marquee for displaying long file names in zPlayer. Below is an exact replica of the code. You can try this code with filenames of different lengths. In this example, the 2nd and 3rd files are both 53 characters long, but their string widths are different: the 2nd is 320 pixels, the same as the GUI, and the 3rd is 340 pixels, slightly wider than the GUI. The first two files do not need to scroll, but the third does. #include <GUIConstants.au3> Global $sTitle, $hMain, $guiWidth = 320, $idTitle, $titlePosX = 5, $titlePosY = 10 Global $titleWidth, $sGap = " ", $titlePosX2, $marqueeInterval = 40, $iMarquee $sTitle = "Luciano Pavarotti - Una Furtiva Lagrima.mp3" ; 34 characters, 254 pixels ;$sTitle = "Schubert - Symphony No.8 in B minor, 'Unfinished'.mp3" ; 53 characters, 320 pixels ;$sTitle = "Schumann - Scenes from Childhood, Op 15, Taumerei.mp3" ; 53 characters, 340 pixels - 'r' intentionally omitted $hMain = GUICreate("zPlayer", $guiWidth, 100) GUISetFont(10, 400, 0, "Arial") $idTitle = GUICtrlCreateLabel($sTitle, $titlePosX, $titlePosY, $guiWidth, 18, BitOR($SS_NOPREFIX, $SS_LEFTNOWORDWRAP)) GUISetState() Local $tmpGUI, $tmpLabel $tmpGUI = GUICreate("") ; Temporary GUI to measure pixel width of $sTitle GUISetFont(10, 400, 0, "Arial", $tmpGUI) $tmpLabel = GUICtrlCreateLabel($sTitle, 0, 0, -1, 18, BitOR($SS_NOPREFIX, $SS_LEFTNOWORDWRAP)) $titleWidth = ControlGetPos($tmpGUI, "", $tmpLabel)[2] - 9 ; The label width is wider than actual string width by 9 pixels. GUIDelete($tmpGUI) ConsoleWrite("Title Length:" & @TAB & StringLen($sTitle) & " characters" & @CRLF) ConsoleWrite("Title Width:" & @TAB & $titleWidth & " pixels" & @CRLF) If $titleWidth >= $guiWidth - $titlePosX*2 Then If $titleWidth <= $guiWidth Then ControlMove($hMain, "", $idTitle, Round(($guiWidth-$titleWidth)/2), $titlePosY) Else ControlMove($hMain, "", $idTitle, $titlePosX, $titlePosY, $titleWidth+$guiWidth+StringLen($sGap)*4) GUICtrlSetData($idTitle, $sTitle & $sGap & $sTitle) ; 5 spaces between tail and trailing head, 4 pixels each $titlePosX2 = $titlePosX $iMarquee = 0 AdlibRegister("_Marquee", $marqueeInterval) EndIf EndIf Do Sleep(10) Until GUIGetMsg() = -3 Func _Marquee() ; 3 seconds of halt when the head comes to the initial position. Sleep() is not recommended. $iMarquee += 1 If $iMarquee < 3000/$marqueeInterval Then Return $titlePosX2 -= 1 ControlMove($hMain, "", $idTitle, $titlePosX2, $titlePosY) If -$titlePosX2 = $titleWidth + StringLen($sGap) * 4 - $titlePosX Then ; Each space is 4 pixels wide $titlePosX2 = $titlePosX $iMarquee = 0 EndIf EndFunc1 point
-
multiple inetget with $INET_DOWNLOADBACKGROUND
SOLVE-SMART reacted to rudi for a topic
OK, thanks for the Input. So I think I will use Autoit to create the wanted folder structure and to create a powershell script doing the downloads, always e.g. 10 simultaneously, using Invoke-WebRequest1 point -
That sounds a lot like my first steps with VSCode. I had to "force" myself to use it and nowadays I love AutoIt @ VSCode. The single biggest improvement for my daily work is the problems tab in VSCode. Getting directly feedback where I have an syntax error or whatnot is so amazing. Having someone like Jos supporting the VSCode extension would be a huge benefits. Judging by all the fantastic work he has done over the last decade with SCITe that could really help to improve the extenstion even further.1 point
-
DarkMode UDF for AutoIt's Win32GUIs
argumentum reacted to WildByDesign for a topic
I agree 100% about not patching everything. I apologize that you had such a bad experience. I should have gave you more details initially but I did not want to go too far off-topic. I don't like patching digitally signed files since it breaks the signatures. So what I did was write a system tray tool in AutoIt that simply switches msstyles. So I grab the msstyles (theme files) only from Rectify11 repo and only use that. That way the system can't be broken from it since no files are being patched. Anyway, I don't want to further go off-topic here. But you can feel free to private message here in the forum anytime if you need to.1 point