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:
Global $myVar = "foo"
#include "secondary.au3"
secondary.au3:
The code works fine when main.au3 executed, but when I edit secondary.au3 vscode complains that $myVar is not declared.
What could we do about this?
Possible solutions:
- setting where we can specify "root" files
- a comment inside included file with a name of the parent file
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.au3file:secondary.au3:The code works fine when
main.au3executed, but when I editsecondary.au3vscode complains that$myVaris not declared.What could we do about this?
Possible solutions: