Jump to content

Recommended Posts

Posted

Hi, thanks for your great work. I tried to find something to use VS Code, as I am used to it.

For some reason, Damien's extension is highlighting a lot of my code due to unreachable functions, since I'm developing in multiples files at once and calling functions outside their files. As I couldn't find a fix, I tried yours.

 

I have to say that it fills all my needs. Lack of debug console was a problem for me ; I fixed it by making a task in my tasks.json that runs Au3Check.exe, and a custom launch.json that runs the task and the script. It works like a charm ! I can even ctrl+click on the error in debug console to get on it.

 

The only trouble I'm struggling to fix is I cannot manage to print special chars in my debug console. My files all are encoded in UTF-8, I've searched in extension settings, tried few parameters in settings.json,... Here's what kind of thing I get :

D�marrage de l'application

Also, is there any quick way to access to the doc while hovering a function ? just like Damien's extension by pressing ctrl+f1 or SciTE by pressing F1 ?
I tried some shortcuts but didn't manage to get it working.

 

Thanks again for your work @genius257 !

May the force be with you.

Open AutoIt Documentation within VS Code

Posted

Hi @ValentinM :D

Many thanks for your kind words and feedback! :)

10 hours ago, ValentinM said:

For some reason, Damien's extension is highlighting a lot of my code due to unreachable functions, since I'm developing in multiples files at once and calling functions outside their files. As I couldn't find a fix, I tried yours.

I have not implemented code for warning against undefined variables or functions yet, so it might become an issue later on, but I'll try to keep in mind adding a way to disable it ;)

10 hours ago, ValentinM said:

Lack of debug console was a problem for me

I provide console support via another extension Name: AutoIt3 Debug

10 hours ago, ValentinM said:

The only trouble I'm struggling to fix is I cannot manage to print special chars in my debug console. My files all are encoded in UTF-8, I've searched in extension settings, tried few parameters in settings.json,... Here's what kind of thing I get :

D�marrage de l'application

My extension currently also have the same issue, but i think i just fixed it, and will release an update today or tomorrow :)

10 hours ago, ValentinM said:

Also, is there any quick way to access to the doc while hovering a function ? just like Damien's extension by pressing ctrl+f1 or SciTE by pressing F1 ?
I tried some shortcuts but didn't manage to get it working.

No i currently do not have added a feature to access AutoIt3 documentation. I do plan to add links for the online version, for native/built-in functions, but have not finished my doc parser support for tags containing the links.

Posted (edited)

Hi genius257,

Thanks for your fast reply !

8 hours ago, genius257 said:

I have not implemented code for warning against undefined variables or functions yet, so it might become an issue later on, but I'll try to keep in mind adding a way to disable it ;)

I don't know much about VS Code Extension, would it be hard (or even possible) to detect variables in other files, especially those who are included (#include) ?

8 hours ago, genius257 said:

I provide console support via another extension Name: AutoIt3 Debug

I did a lot of things yesterday, so I don't remember exactly what was the problem I experienced, but I had an issue with it. I'll try it again by the end of the week.

8 hours ago, genius257 said:

My extension currently also have the same issue, but i think i just fixed it, and will release an update today or tomorrow :)

I'm very happy to read this ! It will be so useful.

8 hours ago, genius257 said:

No i currently do not have added a feature to access AutoIt3 documentation. I do plan to add links for the online version, for native/built-in functions, but have not finished my doc parser support for tags containing the links.

I found an alternative way by installing AutoIt VS Code Extension by crstein, and disable all extension's shortcuts in settings to avoid conflicts with yours, except the one who's opening the doc. The only inconvenience is I need to select the entire function and then press Ctrl+F1, instead of just having my cursor anywhere on the function.

Edited by ValentinM

May the force be with you.

Open AutoIt Documentation within VS Code

Posted
3 hours ago, ValentinM said:

I don't know much about VS Code Extension, would it be hard (or even possible) to detect variables in other files, especially those who are included (#include) ?

If the current file contains the include statement, and there are no syntax errors detected, then variable and function definitions will be detected. Currently you can ctrl+click or goto definition via right click context menu for variables and functions, if included like previously mentioned.

Currently i have not made a good implementation for fast lookup, so when my code currently finds the definition it looks through each syntax tree for each relevant file, until the match is found. The issue is not making the lookup part itself, the hard part for me is finding a good way to be able to update the lookup data when files change, without parsing everything from scratch every time.

3 hours ago, ValentinM said:

I did a lot of things yesterday, so I don't remember exactly what was the problem I experienced, but I had an issue with it. I'll try it again by the end of the week.

If you still experience issues, let me know, it might be something that i can fix quickly and give everyone a better experience and setup flow :)

3 hours ago, ValentinM said:

I found an alternative way by installing AutoIt VS Code Extension by crstein, and disable all extension's shortcuts in settings to avoid conflicts with yours, except the one who's opening the doc. The only inconvenience is I need to select the entire function and then press Ctrl+F1, instead of just having my cursor anywhere on the function.

Very cool you found a solution that works for you :D

  • 4 weeks later...
Posted

Version 1.6.1 has just been released!

  • The function snippet, now uses "func" instead of "fun" for the string prefix.
  • Variables declared via for loops are now recognized by the extension.
  • include statements that fail to resolve, should no longer have links added to them.

Sorry for the slow release. Personal things, combined with my vscode and docker that keeps crashing due to running out of memory, have delayed this release by at least a month. 😕 

Anyway, i am currently looking into:

  • adding errors for things like include statements that fail to resolve.
  • improving the function signature helper (currently it disappears if the parser fails on that line, like when adding a comma within the parentheses, but there is nothing between the comma and the closing parenthesis)
  • adding setting for omitting included functions and variables with the "__" prefix from the completion suggestions.
  • 1 month later...
Posted (edited)

Version 1.7.0 has just been released!

Notable changes:

  • Peek/Goto build-in function declarations now works (will open my mock included file)
  • Include statements that fail to resolve will now be indicated with an error on that line
  • Absolute paths for include statements now resolves
  • New setting (autoit3.ignoreInternalInIncludes). When set to true, internal declarations (vars and funcs) within includes, will be ignored from completion suggestions

I have not picked my goals for 1.8 yet, so please let me know here or on GitHub, if you have any wishes.


The extension got it's first review on the visualstudio marketplace! So many thanks to Valentin for the glowing review! :D

And a personal achivement of making my repository auto publish to the visualstudio marketplace and Open VSX, whenever i create a new release! :D

Edited by genius257

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
×
×
  • Create New...