Jump to content

Recommended Posts

Posted

It seems that the extension sets autoit.aiPath by default as C:\\Program Files (x86)\\AutoIt3\\AutoIt3.exe (AutoIt-VSCode/package.json at bb6a8f6f5ce9fed0bf070059bb6458a6e47e7030 · loganch/AutoIt-VSCode) and that seems to be the problem.

If I change the settings.json file to "autoit.aiPath": "C:\\Program Files (x86)\\AutoIt3\\" it literally fixes everything. The built-in extension combos of F7, Ctrl+F7, etc. all still work properly with that change. I have to test it a bit more but so far so good. If it checks out good, we'll have to suggest it to the developer of the extension.

Posted
3 minutes ago, WildByDesign said:

If it checks out good, we'll have to suggest it to the developer of the extension.

Thanks, I think the pull request regarding this would be easy. But it could be the case that there are more functions involved which can be analyzed by debugging. Maybe I can check it too (tomorrow). Next step, as you already mentioned, calling @LoganCH for this. But unfortunately he did not give us any sign for weeks, no matter on which channel (here on the forum or on GitHub). I hope he's doing well 🤔 .

Best regards
Sven

==> AutoIt related: 🔗 GitHub, 🔗 Discord Server

Spoiler

🌍 Au3Forums

🎲 AutoIt (en) Cheat Sheet

📊 AutoIt limits/defaults

💎 Code Katas: [...] (comming soon)

🎭 Collection of GitHub users with AutoIt projects

🐞 False-Positives

🔮 Me on GitHub

💬 Opinion about new forum sub category

📑 UDF wiki list

✂ VSCode-AutoItSnippets

📑 WebDriver FAQs

👨‍🏫 WebDriver Tutorial (coming soon)

Posted

I will test more tonight. Another thought would be having him split that variable into two different variables. One with just path and the other with path and binary. But I don’t think that will be necessary.

Posted
7 hours ago, WildByDesign said:

If I change the settings.json file to "autoit.aiPath": "C:\\Program Files (x86)\\AutoIt3\\" it literally fixes everything. The built-in extension combos of F7, Ctrl+F7, etc. all still work properly with that change. I have to test it a bit more but so far so good. If it checks out good, we'll have to suggest it to the developer of the extension.

I've spent a few hours testing various options within the extension and everything has worked well on my end with this one small change. It also fixed the issues with Jos' tasks.

Further, the extension seems to append the various AutoIt binaries to "autoit.aiPath", here: AutoIt-VSCode/src/ai_config.js at bb6a8f6f5ce9fed0bf070059bb6458a6e47e7030 · loganch/AutoIt-VSCode

Posted

It doesn't seem to populate any of the fields. It sets AutoIt path by default value and everything else is relative to that path.

For "autoit.wrapperPath", it takes AutoIt path and adds:

wrapperPath: { dir: 'SciTE\\AutoIt3Wrapper\\', file: 'AutoIt3Wrapper.au3' },

That translates to: "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3"

  • Developers
Posted (edited)

Just for the heck of it: I've modified my forked repo extension code to include these standard shortcuts/tasks :

  • Tidy   (Ctrl+t)
  • Au3Stripper (Ctrl+Shift+x)
  • AddIncludes (Ctrl+Shift+m)

.. and think this works nicer than defining the tasks.json. 

Also added a fix to be able to cope with the -1 returncode from Tidy. 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

  • Developers
Posted (edited)

I had one "annoyance" while using VSC where Ctrl+/ does what in SciTE is accomplished with Ctrl+Q, but in SciTE the :~ is added at the start of the line and in VSCode it is added indented in front of the code with one space. Then when tidy is ran, the comment is moved to the left as Tidy assumes that SciTE requires it to be at the start of the line.
Is there any reason why VSCode works different, or do people like it better that way? 
I can change Tidy in a way that when ran by Scite, it does the current behavior and when run by other editors it will Indent the comments with the normal code.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
49 minutes ago, Jos said:

Is there any reason why VSCode works different, or do people like it better that way? 

Generally respecting the indentation when commenting or un-commentating a line seems like the best approach in my opinion. Doing it like in SciTE, gives issues, when you want to indent a section containing an out-commented line of code, where with vscode the identation is no issue and un-commentating the line later, does not produce the same possible problems.

  • Developers
Posted
18 hours ago, genius257 said:

Generally respecting the indentation when commenting or un-commentating a line seems like the best approach in my opinion. Doing it like in SciTE, gives issues, when you want to indent a section containing an out-commented line of code, where with vscode the identation is no issue and un-commentating the line later, does not produce the same possible problems.

No issue, so we would want Tidy to respect that when not ran from SciTE.  I have uploaded a Beta version that checks how the program is shelled and will Indent linecomments when not ran from SciTE.

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted (edited)

Another benefit would be for folding. Since VSCode relies on indentation to determine foldable areas/ and start/stop fold positions. Though I haven't checked if unindented comments stop folding?

Edit: Yes it can.

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

  • Developers
Posted (edited)
1 hour ago, argumentum said:

The new Au3Check.dat is missing data ( Maps, SetExitCode, etc. )

Thanks...   fixed in Beta downloads, but is really not needed to download as the installer only updates au3check.exe to support the mixed encoding, but will use the available au3check.dat.

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Posted
6 hours ago, donnyh13 said:

Another benefit would be for folding. Since VSCode relies on indentation to determine foldable areas/ and start/stop fold positions.

By default, yes. An extension can provide specific folding information. The LSP specification also allows this if it registers the foldingRange capability and a provider.
Try this in JS/TS:
 

if(1){
// a
if(1){
// b
// c
// d
// e
}
}

 

Posted (edited)

Thanks.

On 3/9/2025 at 4:59 PM, genius257 said:

An extension can provide specific folding information

While this is true in generality, even with my indentation settings set to Auto, which is supposed to use the extension's folding settings first, then indent if necessary, indentation seems to still override it. Try this: It folds to the comment in both your, and Logan's extension.

Func FunctionName()

    Local $iError = 0
;~  Local $aError[5]

    If Not 1 = 1 Then Return False
EndFunc

 

Edited by donnyh13

LibreOffice UDF  ; Scite4AutoIt Spell-Checker Using LibreOffice

Spoiler

"Life is chiefly made up, not of great sacrifices and wonderful achievements, but of little things. It is oftenest through the little things which seem so unworthy of notice that great good or evil is brought into our lives. It is through our failure to endure the tests that come to us in little things, that the habits are molded, the character misshaped; and when the greater tests come, they find us unready. Only by acting upon principle in the tests of daily life can we acquire power to stand firm and faithful in the most dangerous and most difficult positions."

 

Posted
12 hours ago, donnyh13 said:

While this is true in generality, even with my indentation settings set to Auto, which is supposed to use the extension's folding settings first, then indent if necessary, indentation seems to still override it. Try this: It folds to the comment in both your, and Logan's extension.

I have not checked Logan's extension, but in mine i have not yet implemented any folding information provider 😉

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...