Skip to main content
rcraighead
Legend
July 15, 2022
解決済み

"doScript" scripts fail in AI 2022

  • July 15, 2022
  • 返信数 2.
  • 4075 ビュー

I have an Illustrator Action Library I've been using since AI 2015.
Since upgrading from AI 2020 to 2022 I find any script calling these actions with "doScript" fail if run from VSCode. If I run the action directly in AI 2022 they work fine.

Does anyone know how I can alter the scripts to allow them to work in AI 2022?

Edit:
I've determined it is not the scripts themselves. The failure occurs when they are run from VSCode directly. Running them via Keyboard Maestro works fine.


Version info:
Version: 1.69.1
Commit: b06ae3b2d2dbfe28bca3134cc6be65935cdfea6a
Date: 2022-07-12T08:21:51.333Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin x64 21.5.0

Will see about downgrading.

 

このトピックへの返信は締め切られました。
解決に役立った回答 rcraighead
quote

So I just ran the following script with v2.0.3:

 

 

app.doScript("Opacity 60 (selection)", "Default Actions");

 

 

and it appears to work... if there have been no errors in the ExtendScript engine (e.g. `main`) prior to running the script.

 

If there have been errors, Illustrator itself appears to go into an infinite loop (on macOS, at least) and must be Force Quit. Is this what you're referring to when you say that `doScript` doesn't work?


By @sberic


Yes. This is very repeatable for me in AI 2022.


@sberic@erinferinferinf@m1b@Anubhav M,
By rolling back to ExtendScript Debugger v1.1.2 I am now able to debug "doScript" scripts without issue.
@sberic, I did post this issue on the "ExtendScript Debugger" comments page. Since it may ultimately be a "Ai 2022" bug I feel the ExtendScript Debugger team my have more access to the Ai Development team than I do. I will at least attempt to file a Bug report in the appropriate place (where ever that is).

 

Setup:
Mac Studio M1 Max

VSCode 1.69.2 (Universal running in Rosetta)

Illustrator CC 2022

 

Thanks,

Ray

返信数 2

m1b
Community Expert
Community Expert
July 15, 2022

Hi @rcraighead, what happens when you run the script from Illustrator?

rcraighead
rcraighead作成者
Legend
July 15, 2022

It runs fine directly from Illustrator. Thanks @m1b 

m1b
Community Expert
Community Expert
July 15, 2022

I'd be happy to test from my VSCode if you post a sample action and script.

- Mark

Anubhav M
Community Manager
Community Manager
July 15, 2022

Hello @rcraighead,

 

Sorry to hear about this experience. I would request you to try the suggestions shared in this community post (https://community.adobe.com/t5/illustrator-discussions/app-doscript-probem/td-p/11200321) and check if it helps.

 

Looking forward to your response.

 

Thanks,

Anubhav

rcraighead
rcraighead作成者
Legend
July 15, 2022

@Anubhav M , these are scripts I've been using for years. They still run fine directly in AI or from Keyboard Maestro. They just fail (and cause Ai to hang) if run from VSCode.

FYI: I am running VSCode 1.69.1 and ExtendScript Debugger 2.0.3. I notice Debugger was updated 7/14. I wonder if that's the issue?

ExtendScript Debugger 2.0.3 - 2022-07-14

 

Edit:
Confirmed: Downgraded ES Debugger to 2.02 and "doScript" method now works from VSCode!

erinferinferinf
Adobe Employee
Adobe Employee
July 15, 2022

You can ask @sberic, the developer. The version we just released has some new notes on Illustrator peculiarities...