Skip to content

Commit

Permalink
Merge branch 'Dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
rendertom committed Mar 8, 2021
2 parents c740fe0 + c1daf35 commit 05a4be1
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 125 deletions.
5 changes: 3 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
"valid-typeof": "warn",
"semi": "warn"
}
}
}
8 changes: 0 additions & 8 deletions .vscodeignore

This file was deleted.

79 changes: 46 additions & 33 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,124 +6,137 @@ All notable changes to the Adobe Script Runner extension will be documented in t

### Added

*
-

### Changed

*
-

### Fixed

*
-

### Removed

*
-

---

## [0.4.0] 2021-03-09

### Added

- Option to toggle **Bring Host Application To Front** on execution for Mac.

### Changed

- Updates default paths for Illustrator and Photoshop for Windows to 2021 application version.
- Updates default path for After Effects for Windows to 2020 application version.

---

## [0.3.0] 2019-12-12

### Added

* Option to always **Execute File From Config** file defined in **Execute This** section, ignoring the one in active viewer.
* Option to **Execute File From Token** `Adobe-Script-Runner "path/to/file.jsx"` in active document to execute file between the quotes.
- Option to always **Execute File From Config** file defined in **Execute This** section, ignoring the one in active viewer.
- Option to **Execute File From Token** `Adobe-Script-Runner "path/to/file.jsx"` in active document to execute file between the quotes.

### Changed

* Codebase rewritten from scratch.
* Renamed configuration keys and titles.
- Codebase rewritten from scratch.
- Renamed configuration keys and titles.

### Removed

* Checkbox **Run Untitled**.
- Checkbox **Run Untitled**.

---

## [0.2.1] 2019-01-05

### Changed

* Updates default Windows paths to CC2019 version.
* Updates descriptions for `Run Untitled`, `Save Dirty`, and `Temp File` in extensions Settings window.
- Updates default Windows paths to CC2019 version.
- Updates descriptions for `Run Untitled`, `Save Dirty`, and `Temp File` in extensions Settings window.

---

## [0.2.0] 2018-03-29

### Fixed

* Fixed bug when settings were not registered until app restart.
* Fixed issue with HOME "~/" paths.
- Fixed bug when settings were not registered until app restart.
- Fixed issue with HOME "~/" paths.

### Changed

* Changed code flow. Splits everything into modules for easier maintenance and development. Also makes it easier for other apps to adopt the functionality.
* Ports functionality to [Atom.io](https://atom.io/packages/adobe-script-runner).
- Changed code flow. Splits everything into modules for easier maintenance and development. Also makes it easier for other apps to adopt the functionality.
- Ports functionality to [Atom.io](https://atom.io/packages/adobe-script-runner).

---

## [0.1.2] 2018-03-14

### Added

* Default keybinding `Cmd+R` ro tun `adobeScriptRunner.ae` command.
* Instructions on how to assign keybindings to commands in `README.md` file.
- Default keybinding `Cmd+R` ro tun `adobeScriptRunner.ae` command.
- Instructions on how to assign keybindings to commands in `README.md` file.

---

## [0.1.1] 2018-03-14

### Changed

* Extension icon.
- Extension icon.

---

## [0.1.0] 2018-03-13

### Added

* Support to execute scripts in `Adobe InCopy`.
* Support for Windows.
- Support to execute scripts in `Adobe InCopy`.
- Support for Windows.

---

## [0.0.3] 2018-03-12

### Added

* Support to open scripts inside `Adobe ExtendScript Toolkit`.
* Looping gif to README.md file that looks amazing.
- Support to open scripts inside `Adobe ExtendScript Toolkit`.
- Looping gif to README.md file that looks amazing.

### Fixed

* Fixed typos in `README.md`.
- Fixed typos in `README.md`.

### Changed

* Updated `extension.js` to use es6 syntax.
* Updated info message to show app name the script has been sent to.
* Renamed settings object `adobeScriptLauncher` to `adobeScriptRunner`.
* Changed location of temp file `Snippet.js` to `~/.vscode` instead of `~/Desktop` folder.
* Created `resources` folder to dump all image files there.
- Updated `extension.js` to use es6 syntax.
- Updated info message to show app name the script has been sent to.
- Renamed settings object `adobeScriptLauncher` to `adobeScriptRunner`.
- Changed location of temp file `Snippet.js` to `~/.vscode` instead of `~/Desktop` folder.
- Created `resources` folder to dump all image files there.

---

## [0.0.2] 2018-03-11

### Added

* Support to execute scripts in `Adobe Illustrator`.
* Support to execute scripts in `Adobe InDesign`.
- Support to execute scripts in `Adobe Illustrator`.
- Support to execute scripts in `Adobe InDesign`.

### Changed

* README.md and CHANGELOG.md files to reflect changes.
* Refactored `scriptCommands` object.
- README.md and CHANGELOG.md files to reflect changes.
- Refactored `scriptCommands` object.

---

## [0.0.1] 2018-03-10

* Initial release
- Initial release
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,18 @@ The file path gets resolved by joining this path and the Workspace (or Root `/`)

## Settings

Click `Cmd+,` on Mac or `Ctrl+,` on Windows to modify settings. Extension exposes the following settings:
Click `Cmd+,` on Mac or `Ctrl+,` on Windows to modify settings. Extension exposes the following API:

- `adobeScriptRunner.executeFileFromConfig`: Whether to execute file, defined in config `.vscode/settings.json` file. See more in [Execute this](#execute-this) section.
- `adobeScriptRunner.executeFileFromToken`: Whether to search for `Adobe-Script-Runner "path/to/file.jsx"` token in active document, and execute file within the quotes. See more in [Token](#token) section.
- `adobeScriptRunner.executeThis`: A path to a file to execute always, ignoring the file in the viewer, globally or per-project basis. See more in [Execute this](#execute-this) section.
- `adobeScriptRunner.saveFileBeforeExecution`: Whether to save file before execution.
- `adobeScriptRunner.temporaryFile`: Path to a temporary file where Untitled document gets saved prior to execution.

**For Mac users only:**

- `adobeScriptRunner.bringHostApplicationToFront`: Whether to bring the host application to the front. If this option is turned off, then the **debug console** prints `1` if there were execution errors, otherwise `0`.

**For Windows users only:**

- `adobeScriptRunner.winAfterEffectsExe`: path to Adobe After Effects executable (AfterFX.exe).
Expand Down
14 changes: 0 additions & 14 deletions jsconfig.json

This file was deleted.

7 changes: 5 additions & 2 deletions lib/getShellCommand.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,18 @@ const ide = require('./ide.js');
function getShellCommand(hostApp, scriptFile, callback) {
const applicationName = hostApp.appName;
const platform = process.platform;
const settings = ide.config.get();

let command = hostApp[platform];
if (!command) {
throw ide.showInformationMessage(`${applicationName} is not hooked-up to work with ${platform} os.`);
}

if (platform === 'win32' && command.includes('{appExe}')) {
if (platform === 'darwin' && command.includes('{activate}')) {
const activate = settings.bringHostApplicationToFront ? 'activate' : '';
command = command.replace('{activate}', activate);
} else if (platform === 'win32' && command.includes('{appExe}')) {
// InDesign and InCopy does not expose 'appExe' in settings - they are launched via Visual Basic magic.
const settings = ide.config.get();
const appExe = settings[hostApp.appExe];
if (!appExe || !file.exists(appExe)) {
throw ide.showErrorMessage(`Unable to find ${applicationName} executable defined in settings. Make sure you have that path set-up correctly.`);
Expand Down
12 changes: 6 additions & 6 deletions lib/hostApps.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@ const hostApps = [
{
'shortName' : 'ae',
'appName': 'Adobe After Effects',
'darwin': `osascript -e 'tell application id "com.adobe.aftereffects" to activate DoScriptFile "{scriptFile}" with override'`,
'darwin': `osascript -e 'tell application id "com.adobe.aftereffects" to {activate} DoScriptFile "{scriptFile}" with override'`,
'win32': `"{appExe}" -r {scriptFile}`,
'appExe' : 'winAfterEffectsExe',
},
{
'shortName' : 'ai',
'appName': 'Adobe Illustrator',
'darwin': `osascript -e 'tell application id "com.adobe.illustrator" to activate do javascript file "{scriptFile}"'`,
'darwin': `osascript -e 'tell application id "com.adobe.illustrator" to {activate} do javascript file "{scriptFile}"'`,
'win32': `"{appExe}" -r {scriptFile}`,
'appExe' : 'winIllustratorExe',
},
{
'shortName' : 'estk',
'appName': 'Adobe ExtendScript Toolkit',
'darwin': `osascript -e 'tell application id "com.adobe.estoolkit-4.0" to activate open "{scriptFile}"'`,
'darwin': `osascript -e 'tell application id "com.adobe.estoolkit-4.0" to {activate} open "{scriptFile}"'`,
'win32': `"{appExe}" -run {scriptFile}`,
'appExe' : 'winExtendscriptToolkitExe',
},
{
'shortName' : 'ic',
'appName': 'Adobe InCopy',
'darwin': `osascript -e 'tell application id "com.adobe.InCopy" to activate do script "{scriptFile}" language javascript'`,
'darwin': `osascript -e 'tell application id "com.adobe.InCopy" to {activate} do script "{scriptFile}" language javascript'`,
'win32': `powershell -command "$app = new-object -comobject InCopy.Application; $app.DoScript('{scriptFile}', 1246973031)"`, //http://jongware.mit.edu/idcs6js/pe_ScriptLanguage.html
},
{
'shortName' : 'id',
'appName': 'Adobe InDesign',
'darwin': `osascript -e 'tell application id "com.adobe.InDesign" to activate do script "{scriptFile}" language javascript'`,
'darwin': `osascript -e 'tell application id "com.adobe.InDesign" to {activate} do script "{scriptFile}" language javascript'`,
'win32': `powershell -command "$app = new-object -comobject InDesign.Application; $app.DoScript('{scriptFile}', 1246973031)"`, //http://jongware.mit.edu/idcs6js/pe_ScriptLanguage.html
},
{
'shortName' : 'psd',
'appName': 'Adobe Photoshop',
'darwin': `osascript -e 'tell application id "com.adobe.photoshop" to activate do javascript file "{scriptFile}"'`,
'darwin': `osascript -e 'tell application id "com.adobe.photoshop" to {activate} do javascript file "{scriptFile}"'`,
'win32': `"{appExe}" -r {scriptFile}`,
'appExe' : 'winPhotoshopExe',
},
Expand Down
30 changes: 17 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "adobe-script-runner",
"displayName": "Adobe Script Runner",
"description": "Run Adobe scripts from VSCode",
"version": "0.3.0",
"version": "0.4.0",
"publisher": "renderTom",
"icon": "resources/icon.png",
"galleryBanner": {
Expand Down Expand Up @@ -56,6 +56,11 @@
"type": "object",
"title": "Adobe Script Runner configuration",
"properties": {
"adobeScriptRunner.bringHostApplicationToFront": {
"type": "boolean",
"default": true,
"markdownDescription": "Mac only: Whether to bring the host application to the front."
},
"adobeScriptRunner.executeFileFromConfig": {
"type": "boolean",
"default": true,
Expand Down Expand Up @@ -83,7 +88,7 @@
},
"adobeScriptRunner.winAfterEffectsExe": {
"type": "string",
"default": "C:/Program Files/Adobe/Adobe After Effects CC 2019/Support Files/AfterFX.exe",
"default": "C:/Program Files/Adobe/Adobe After Effects 2020/Support Files/AfterFX.exe",
"description": "Windows only: Path to Adobe After Effects executable (AfterFX.exe)."
},
"adobeScriptRunner.winExtendscriptToolkitExe": {
Expand All @@ -93,12 +98,12 @@
},
"adobeScriptRunner.winIllustratorExe": {
"type": "string",
"default": "C:/Program Files/Adobe/Adobe Illustrator CC 2019/Support Files/Contents/Windows/Illustrator.exe",
"default": "C:/Program Files/Adobe/Adobe Illustrator 2021/Support Files/Contents/Windows/Illustrator.exe",
"description": "Windows only: Path to Adobe Illustrator executable (Illustrator.exe)."
},
"adobeScriptRunner.winPhotoshopExe": {
"type": "string",
"default": "C:/Program Files/Adobe/Adobe Photoshop CC 2019/Photoshop.exe",
"default": "C:/Program Files/Adobe/Adobe Photoshop 2021/Photoshop.exe",
"description": "Windows only: Path to Adobe Photoshop executable (Photoshop.exe)."
}
}
Expand All @@ -120,19 +125,18 @@
"Photoshop",
"InDesign"
],
"scripts": {
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "node ./node_modules/vscode/bin/test"
},
"repository": {
"type": "git",
"url": "https://github.com/rendertom/VSCode-Adobe-Script-Runner.git"
},
"scripts": {
"package": "vsce package"
},
"devDependencies": {
"typescript": "^2.6.1",
"vscode": "^1.1.6",
"eslint": "^4.11.0",
"@types/mocha": "^2.2.42",
"@types/node": "^7.0.43",
"@types/mocha": "^2.2.42"
"eslint": "^4.11.0",
"vsce": "^1.85.1",
"vscode": "^1.1.6"
}
}
}
24 changes: 0 additions & 24 deletions test/extension.test.js

This file was deleted.

Loading

0 comments on commit 05a4be1

Please sign in to comment.