Vitaliy4us Posted July 21, 2020 Share Posted July 21, 2020 (edited) I am trying to run *.au3 script from VSCode. I installed some plugins: Damien, 4ern, Code Runner but non of them could be used for this aim. Code editor works fine and the code is highlighted, but if I try to run the code I get an error: Line 0 (File "c:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3"); Error: Error opening the file. The script works fine by running it from SciTE editor Edited July 21, 2020 by Vitaliy4us Link to comment Share on other sites More sharing options...
Sidley Posted July 22, 2020 Share Posted July 22, 2020 There's several ways to do this, you could compile the script to an executable and run that, you could add the AutoIt3.exe to the PATH variables so that the command line can run it from anywhere. If you want to just run a file without these two, this works: string pathToAutoIt; string pathToScript; pathToAutoIt = @"C:\Program Files (x86)\AutoIt3\AutoIt3.exe"; pathToScript = @"\path\to\script.au3"; Process externalProcess = new Process(); externalProcess.StartInfo.FileName = pathToAutoIt; externalProcess.StartInfo.Arguments = pathToScript; externalProcess.Start(); externalProcess.WaitForExit(); externalProcess.Dispose(); Link to comment Share on other sites More sharing options...
genius257 Posted July 23, 2020 Share Posted July 23, 2020 (edited) I personally use the damien.autoit extension and have no problem. Have you verified that the AutoIt3Wrapper.au3 file exists at the location? Edit: If no, then try installing this: https://www.autoitscript.com/site/autoit-script-editor/downloads/ Edited July 23, 2020 by genius257 Earthshine 1 My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
Earthshine Posted July 23, 2020 Share Posted July 23, 2020 yeah, but i think i had to modify the path in a JSON file to get it to work My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now