@Dave-Binbin , Is there a way that the NppExec script would work from any file of my project ? that it could know the mainfile of my project ? Maybe with some kind of NPP environnement variable that I could set at the beginning of each file of my project ? I am not sure how you expect NppExec would parse your active file – unlike some of the other scripting language plugins, NppExec doesn’t really have easy access to whatever portion of the current file you want. So I don’t think it would be easy to implement something like that. In the end, you would have to have some way of telling NppExec what the “main” file is for each project. And since NppExec is more filesystem-focused than file-content-focused, I would suggest a specialized file for the purpose. In many software development environments, there is something called a “makefile”, where you define how to compile and/or test and/or otherwise “make” a project – and each project has its own makefile. It could be a literal makefile, which works with the make/gmake/nmake utility on your computer; or it could be a batchfile; or it could be some custom solution. So for your case, I might suggest creating a file called makefile.nppexec, which goes in the same folder as your .au3 files for a given project. The makefile.nppexec would look something like set PROJECTMAINFILE = PutMainFileNameHere.au3 echo Running main program $PROJECTMAINFILE from directory $(CURRENT_DIRECTORY) "C:\Program Files (x86)\AutoIt3\Au3check.exe" "$(CURRENT_DIRECTORY)\$(PROJECTMAINFILE)" if $(EXITCODE) >= 2 goto EXITSCRIPT "C:\Program Files (x86)\AutoIt3\AutoIt3.exe" /ErrorStdOut "$(CURRENT_DIRECTORY)\$(PROJECTMAINFILE)" :EXITSCRIPT … and you would customize the makefile.nppexec in each project to call that project’s main file (using the variable at the top) Then you would change your main NppExec script to: npp_saveall echo Starting from : $(FILE_NAME) cd "$(CURRENT_DIRECTORY)" if $(EXT_PART) != .au3 goto BADFILE npp_exec makefile.nppexec // this runs the "makefile" for the current project goto EXITSCRIPT :BADFILE echo "Not an autoit file !!!" :EXITSCRIPT … so you would have one makefile.nppexec per project folder, and you would then run the central NppExec script, and based on the current directory of the active .au3 file, it would run the appropriate makefile.nppexec from that folder.