(Applescript) do javascript command no longer works in Illustrator 2021(25.1)
Bug report:
When using AppleScript's do javascript in Illustrator 2021(25.1), nothing happens regardless of whether it is a file or text. The result will return a missing value. In 25.0.1, it works fine.
In the case of jsx files, it can be avoided by writing the following code. If the file extension is jsxbin, it cannot be executed. And arguments cannot be passed.
-- solution 1
tell application "Adobe Illustrator"
open ("Macintosh HD:Users:username:Desktop:sample.jsx" as alias)
end tell
-- solution 2
tell application "Finder"
open ("Macintosh HD:Users:username:Desktop:sample.jsx" as alias) using ("Macintosh HD:Applications:Adobe Illustrator 2021:Adobe Illustrator. app:" as alias)
end tell
-- solution 3
do shell script "open -a '/Applications/Adobe Illustrator 2021/Adobe Illustrator.app/' '/Users/username/Desktop/sample.jsx'"
Environment:
Illustrator 2021(25.1), macOS Mojave(10.14.6)
Expected behavior:
The target JavaScript will be executed.
Japanese >
(AppleScript) Illustrator 2021(25.1)でdo javascriptが動かない
バグ内容:
Illustrator 2021(25.1)でAppleScriptのdo javascriptを使用すると,渡すのがファイルでもテキストでも何も起きない。結果にはmissing valueが返る。25.0.1では正常に実行できる。
jsxファイルの場合,次のようなコードを書くことで回避できる。拡張子がjsxbinだと実行できない。argumentsは渡せない。
-- solution 1
tell application "Adobe Illustrator"
open ("Macintosh HD:Users:username:Desktop:sample.jsx" as alias)
end tell
-- solution 2
tell application "Finder"
open ("Macintosh HD:Users:username:Desktop:sample.jsx" as alias) using ("Macintosh HD:Applications:Adobe Illustrator 2021:Adobe Illustrator. app:" as alias)
end tell
-- solution 3
do shell script "open -a '/Applications/Adobe Illustrator 2021/Adobe Illustrator.app/' '/Users/username/Desktop/sample.jsx'"
動作環境:
Illustrator 2021(25.1), macOS Mojave(10.14.6)
期待される動作:
対象のJavaScriptが実行される。
I am happy to share that we have fixed this bug in our latest release – 25.2 which is available worldwide now.
Going forward, our goal is to fix as many top User-Voice bugs as possible and as frequently as possible. Given the nature of the fixes, some of the bugs will take a longer time to fix, but we are on it.
You can update to the latest release using Creative Cloud desktop App: https://helpx.adobe.com/in/creative-cloud/help/creative-cloud-updates.html
Thank you for all the feedback. Keep it coming!
-
mer C commented
I was able to try Illustrator 25.2 beta, and "do javascript" seems to be working fine.
-
mer C commented
I'm currently waiting for Illustrator 25.2 beta to appear in the Creative Cloud app after joining to the pre-release. It will be some time before I can report back.
-
Maxime Moreau commented
Seems to be fixed in 25.2
-
Maxime Moreau commented
Same problem with javascript code written directly in the applescript:
do Javascript "code here"