Skip to content

Commit 4def7e6

Browse files
authored
Feat: support Beta (#23)
feat(): support Beta apps
1 parent 4ef5292 commit 4def7e6

4 files changed

Lines changed: 71 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ All notable changes to the Adobe Script Runner extension will be documented in t
66

77
### Added
88

9+
- Support to execute scripts in `Adobe After Effects (Beta)`
10+
- Support to execute scripts in `Adobe Illustrator (Beta)`
11+
- Support to execute scripts in `Adobe Photoshop (Beta)`
912
- ESLint + Prettier for a consistent codebase
1013

1114
### Changed
@@ -26,7 +29,7 @@ All notable changes to the Adobe Script Runner extension will be documented in t
2629

2730
### Changed
2831

29-
- Updates default paths for Afterr Effects for Windows to 2021 application version.
32+
- Updates default paths for After Effects for Windows to 2021 application version.
3033

3134
---
3235

README.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ Script runner for Adobe applications right from VSCode. Extension available for
77
## Supported applications
88

99
- Adobe After Effects
10+
- Adobe After Effects (Beta)
1011
- Adobe ExtendScript Toolkit
1112
- Adobe Illustrator
13+
- Adobe Illustrator (Beta)
1214
- Adobe InCopy
1315
- Adobe InDesign
1416
- Adobe Photoshop
17+
- Adobe Photoshop (Beta)
1518

1619
## Features
1720

@@ -33,6 +36,7 @@ Adobe Script Runner executes script in the active viewer by default. However, wh
3336
- Click `Install` and then `Reload` button.
3437

3538
- ### From GitHub
39+
3640
- Download repository and unzip the package.
3741
- Copy `VSCode-Adobe-Script-Runner-master` to `/Users/YOURUSER/.vscode/extensions` folder.
3842

@@ -55,9 +59,9 @@ The result should look something like this:
5559

5660
```json
5761
{
58-
"key": "cmd+r",
59-
"command": "adobeScriptRunner.ae",
60-
"when": "editorTextFocus"
62+
"key": "cmd+r",
63+
"command": "adobeScriptRunner.ae",
64+
"when": "editorTextFocus"
6165
},
6266
```
6367

@@ -69,8 +73,8 @@ Use token to execute a different file, rather than the one in the viewer. Add `A
6973

7074
```javascript
7175
/*
72-
Adobe-script-runner '../../index.js'
73-
Executes file between quotes rather than the one in the active viewer.
76+
Adobe-script-runner '../../index.js'
77+
Executes file between quotes rather than the one in the active viewer.
7478
*/
7579

7680
alert('Hello World'); // This line never gets executed, unless `index.js` is referencing the file in viewer.
@@ -101,9 +105,12 @@ Click `Cmd+,` on Mac or `Ctrl+,` on Windows to modify settings. Extension expose
101105
**For Windows users only:**
102106

103107
- `adobeScriptRunner.winAfterEffectsExe`: path to Adobe After Effects executable (AfterFX.exe).
108+
- `adobeScriptRunner.winAfterEffectsBetaExe`: path to Adobe After Effects (Beta) executable (AfterFX (Beta).exe).
104109
- `adobeScriptRunner.winExtendscriptToolkitExe`: path to Adobe ExtendScript Toolkit executable (ExtendScript Toolkit.exe).
105110
- `adobeScriptRunner.winIllustratorExe`: path to Adobe Illustrator executable (Illustrator.exe).
111+
- `adobeScriptRunner.winIllustratorBetaExe`: path to Adobe Illustrator (Beta) executable (Illustrator.exe).
106112
- `adobeScriptRunner.winPhotoshopExe`: path to Adobe Photoshop executable (Photoshop.exe).
113+
- `adobeScriptRunner.winPhotoshopBetaExe`: path to Adobe Photoshop (Beta) executable (Photoshop.exe).
107114

108115
Executable paths for InCopy and InDesign for Windows are not exposed because they are handled differently than the rest of the Adobe apps. Go figure Adobe ¯\\\_(ツ)\_
109116

lib/hostApps.js

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,31 @@ const hostApps = [
22
{
33
shortName: 'ae',
44
appName: 'Adobe After Effects',
5-
darwin: `osascript -e 'tell application id "com.adobe.aftereffects" to {activate} DoScriptFile "{scriptFile}" with override'`,
5+
darwin: `osascript -e 'tell application id "com.adobe.AfterEffects" to {activate} DoScriptFile "{scriptFile}" with override'`,
66
win32: `"{appExe}" -r {scriptFile}`,
77
appExe: 'winAfterEffectsExe',
88
},
9+
{
10+
shortName: 'ae-beta',
11+
appName: 'Adobe After Effects (Beta)',
12+
darwin: `osascript -e 'tell application id "com.adobe.AfterEffectsBeta" to {activate} DoScriptFile "{scriptFile}" with override'`,
13+
win32: `"{appExe}" -r {scriptFile}`,
14+
appExe: 'winAfterEffectsBetaExe',
15+
},
916
{
1017
shortName: 'ai',
1118
appName: 'Adobe Illustrator',
1219
darwin: `osascript -e 'tell application id "com.adobe.illustrator" to {activate} do javascript file "{scriptFile}"'`,
1320
win32: `"{appExe}" -r {scriptFile}`,
1421
appExe: 'winIllustratorExe',
1522
},
23+
{
24+
shortName: 'ai-beta',
25+
appName: 'Adobe Illustrator (Beta)',
26+
darwin: `osascript -e 'tell application id "com.adobe.illustratorBeta" to {activate} do javascript file "{scriptFile}"'`,
27+
win32: `"{appExe}" -r {scriptFile}`,
28+
appExe: 'winIllustratorBetaExe',
29+
},
1630
{
1731
shortName: 'estk',
1832
appName: 'Adobe ExtendScript Toolkit',
@@ -35,10 +49,18 @@ const hostApps = [
3549
{
3650
shortName: 'psd',
3751
appName: 'Adobe Photoshop',
38-
darwin: `osascript -e 'tell application id "com.adobe.photoshop" to {activate} do javascript file "{scriptFile}"'`,
52+
darwin: `osascript -e 'tell application id "com.adobe.Photoshop" to {activate} do javascript file "{scriptFile}"'`,
3953
win32: `"{appExe}" -r {scriptFile}`,
4054
appExe: 'winPhotoshopExe',
4155
},
56+
{
57+
shortName: 'psd-beta',
58+
appName: 'Adobe Photoshop (Beta)',
59+
// Mac: Adobe Photoshop uses the same CFBundleIdentifier name (com.adobe.Photoshop)
60+
// for Official and Beta versions, so there's no way to target Beta version specifically
61+
win32: `"{appExe}" -r {scriptFile}`,
62+
appExe: 'winPhotoshopBetaExe',
63+
},
4264
];
4365

4466
module.exports = hostApps;

package.json

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,14 @@
1717
],
1818
"activationEvents": [
1919
"onCommand:adobeScriptRunner.ae",
20+
"onCommand:adobeScriptRunner.ae-beta",
2021
"onCommand:adobeScriptRunner.ai",
22+
"onCommand:adobeScriptRunner.ai-beta",
2123
"onCommand:adobeScriptRunner.estk",
2224
"onCommand:adobeScriptRunner.ic",
2325
"onCommand:adobeScriptRunner.id",
24-
"onCommand:adobeScriptRunner.psd"
26+
"onCommand:adobeScriptRunner.psd",
27+
"onCommand:adobeScriptRunner.psd-beta"
2528
],
2629
"main": "./lib/extension",
2730
"contributes": {
@@ -30,10 +33,18 @@
3033
"command": "adobeScriptRunner.ae",
3134
"title": "Adobe After Effects"
3235
},
36+
{
37+
"command": "adobeScriptRunner.ae-beta",
38+
"title": "Adobe After Effects (Beta)"
39+
},
3340
{
3441
"command": "adobeScriptRunner.ai",
3542
"title": "Adobe Illustrator"
3643
},
44+
{
45+
"command": "adobeScriptRunner.ai-beta",
46+
"title": "Adobe Illustrator (Beta)"
47+
},
3748
{
3849
"command": "adobeScriptRunner.estk",
3950
"title": "Adobe ExtendScript Toolkit"
@@ -49,6 +60,10 @@
4960
{
5061
"command": "adobeScriptRunner.psd",
5162
"title": "Adobe Photoshop"
63+
},
64+
{
65+
"command": "adobeScriptRunner.psd-beta",
66+
"title": "Adobe Photoshop (Beta) (Windows only)"
5267
}
5368
],
5469
"configuration": [
@@ -91,6 +106,11 @@
91106
"default": "C:/Program Files/Adobe/Adobe After Effects 2021/Support Files/AfterFX.exe",
92107
"description": "Windows only: Path to Adobe After Effects executable (AfterFX.exe)."
93108
},
109+
"adobeScriptRunner.winAfterEffectsBetaExe": {
110+
"type": "string",
111+
"default": "C:/Program Files/Adobe/Adobe After Effects (Beta)/Support Files/AfterFX (Beta).exe",
112+
"description": "Windows only: Path to Adobe After Effects (Beta) executable (AfterFX (Beta).exe)."
113+
},
94114
"adobeScriptRunner.winExtendscriptToolkitExe": {
95115
"type": "string",
96116
"default": "C:/Program Files (x86)/Adobe/Adobe ExtendScript Toolkit CC/ExtendScript Toolkit.exe",
@@ -101,10 +121,20 @@
101121
"default": "C:/Program Files/Adobe/Adobe Illustrator 2021/Support Files/Contents/Windows/Illustrator.exe",
102122
"description": "Windows only: Path to Adobe Illustrator executable (Illustrator.exe)."
103123
},
124+
"adobeScriptRunner.winIllustratorBetaExe": {
125+
"type": "string",
126+
"default": "C:/Program Files/Adobe/Adobe Illustrator (Beta)/Support Files/Contents/Windows/Illustrator.exe",
127+
"description": "Windows only: Path to Adobe Illustrator (Beta) executable (Illustrator.exe)."
128+
},
104129
"adobeScriptRunner.winPhotoshopExe": {
105130
"type": "string",
106131
"default": "C:/Program Files/Adobe/Adobe Photoshop 2021/Photoshop.exe",
107132
"description": "Windows only: Path to Adobe Photoshop executable (Photoshop.exe)."
133+
},
134+
"adobeScriptRunner.winPhotoshopBetaExe": {
135+
"type": "string",
136+
"default": "C:/Program Files/Adobe/Adobe Photoshop (Beta)/Photoshop.exe",
137+
"description": "Windows only: Path to Adobe Photoshop (Beta) executable (Photoshop.exe)."
108138
}
109139
}
110140
}

0 commit comments

Comments
 (0)