-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project aware #213
Comments
Hi @vanowm, I am confronted with such behavior all the time, because my projects often consists of different folders where the code is separated. As I remenber correctly, we had such requirement few years ago here in the project. I thought it was fixed at a certain time, but then the issue appeared again. It would be wonderful if you or the other maintainers here see a good solution for it 🤗 . Only as a show-case: I decide which file needs to have access (#include) to a specific file (to the functions inside the file). So I can avoid issues with global variables for example. Besides the situation of the warnings, it's also not possible to "jump to function definition" in case of such structure. Which makes me crazy sometimes. But to be honest, I am not able to extend the VSCode extension by a proper handling of this. Best regards |
You can do like this. Always save both files before editing In Main.au3 :
In Secondary.au3 :
|
The issue seems to be with Au3Check and its limitation of simply checking syntax and not running the scripts. I tried the syntax check in SciTE and got the same result. |
Hi all, My workaround is this one:
#noTrayIcon
#Include <AutoItConstants.au3>
#pragma compile(Console, true)
#pragma compile(Out, udCheck.exe)
consolewrite( _
runWaitStdout( _
'"C:\Program Files (x86)\AutoIt3\Au3Check.exe" D:\emie\dev\yetanotherprojekt\app\main.au3' _
) _
)
func runWaitStdout($cmd)
$process_pid = Run(@ComSpec &' /c ' & $cmd, @ScriptDir, @SW_HIDE, $STDERR_MERGED)
processWaitClose($process_pid)
return stdoutRead($process_pid)
endfunc
Now in this workspace, no matter what file is open, au3check will be called with the "entrypoint" of the project |
I'm trying to simplify my script by splitting it into multiple files.
Each file may access global variables/function from other files.
For example,
main.au3
file:secondary.au3
:The code works fine when
main.au3
executed, but when I editsecondary.au3
vscode complains that$myVar
is not declared.What could we do about this?
Possible solutions:
The text was updated successfully, but these errors were encountered: