diff --git a/README.md b/README.md index aa59640..65bfd61 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,14 @@ and developed from Damien122's release. * Launch, compile and build scripts from VSCode * Launch AutoIt Help for highlighted text +## Configuration + +* Access the command palette (Ctrl + Shift + P), type Preferences: Open User Settings or Preferences: Open Workspace Settings. + + +* Configure the paths according to your AutoIt installation. + + ### Note Advanced functions on the full install of [SciTE4AutoIt3](https://www.autoitscript.com/site/autoit-script-editor/downloads/) alongside AutoIt. diff --git a/changelog.md b/changelog.md index af488bf..026f066 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # AutoIt-VSCode Changelog +## 0.1.3 +* Added AutoIt Configuration in Visual Studio Code Preferences. + ## 0.1.2 The IntelliSense release! * Hovers have been added for all UDFs diff --git a/img/docs/AutoItConfiguration.png b/img/docs/AutoItConfiguration.png new file mode 100644 index 0000000..2a6e62d Binary files /dev/null and b/img/docs/AutoItConfiguration.png differ diff --git a/img/docs/CtrlShiftP.png b/img/docs/CtrlShiftP.png new file mode 100644 index 0000000..0a624e3 Binary files /dev/null and b/img/docs/CtrlShiftP.png differ diff --git a/out/src/ai_commands.js b/out/src/ai_commands.js index 257067c..a5c61ac 100644 --- a/out/src/ai_commands.js +++ b/out/src/ai_commands.js @@ -1,14 +1,15 @@ -var { window, Position } = require('vscode'); +var { window, Position, workspace } = require('vscode'); var launch = require('child_process').execFile; const spawn = require('child_process').spawn; var path = require('path'); +var configuration = workspace.getConfiguration('autoit'); // Executable paths -const aiPath = "C:\\Program Files (x86)\\AutoIt3\\AutoIt3.exe"; -const wrapperPath = "C:\\Program Files (x86)\\AutoIt3\\SciTE\\AutoIt3Wrapper\\AutoIt3Wrapper.au3"; -const tidyPath = "C:\\Program Files (x86)\\AutoIt3\\SciTE\\Tidy\\Tidy.exe"; -const checkPath = "C:\\Program Files (x86)\\AutoIt3\\AU3Check.exe"; -var helpPath = "C:\\Program Files (x86)\\AutoIt3\\AutoIt3Help.exe"; +const aiPath = configuration.aiPath; +const wrapperPath = configuration.wrapperPath; +const tidyPath = configuration.tidyPath; +const checkPath = configuration.checkPath; +const helpPath = configuration.helpPath; var aiOut = window.createOutputChannel('AutoIt'); diff --git a/package.json b/package.json index 78461b7..efd9ba4 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "AutoIt", "description": "AutoIt language extension for Visual Studio Code", "icon": "img/ai_icon.png", - "version": "0.1.2", + "version": "0.1.3", "publisher": "Damien", "galleryBanner": { "color": "#254768", @@ -105,6 +105,37 @@ "command": "extension.debugConsole", "key": "alt+d", "when": "editorTextFocus" - }] + }], + "configuration": { + "type": "object", + "title": "AutoIt Configuration", + "properties": { + "autoit.aiPath": { + "type": "string", + "default": "C:\\Program Files (x86)\\AutoIt3\\AutoIt3.exe", + "description": "Path AutoIt3.exe" + }, + "autoit.wrapperPath": { + "type": "string", + "default": "C:\\Program Files (x86)\\AutoIt3\\SciTE\\AutoIt3Wrapper\\AutoIt3Wrapper.au3", + "description": "Path AutoIt3Wrapper.au3" + }, + "autoit.tidyPath": { + "type": "string", + "default": "C:\\Program Files (x86)\\AutoIt3\\SciTE\\Tidy\\Tidy.exe", + "description": "Path Tidy.exe" + }, + "autoit.checkPath": { + "type": "string", + "default": "C:\\Program Files (x86)\\AutoIt3\\AU3Check.exe", + "description": "Path AU3Check.exe" + }, + "autoit.helpPath": { + "type": "string", + "default": "C:\\Program Files (x86)\\AutoIt3\\AutoIt3Help.exe", + "description": "Path AutoIt3Help.exe" + } + } + } } } \ No newline at end of file