Extendscript: Set window focus on Illustrator

Explorer ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

How do I change the focus from any window to Illustrator using Extendscript? I have buttons in a panel that run scripts. When I click on them the current window focus changes to that panel. Unfortunately this means I have to manually click back into Illustrator to continue using Illustrator, which can be quite annoying.

TOPICS
Scripting

Views

98

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct Answer

Adobe Community Professional , Jan 11, 2021 Jan 11, 2021
try this   BridgeTalk.bringToFront("illustrator")

Likes

translate

Translate

Translate
Adobe Community Professional ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

try this

 

BridgeTalk.bringToFront("illustrator")

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

Works perfectly. Thanks!

 

How did you know about this?

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

It's in the Illustrator Tools Guide.pdf

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

At one time I thought that creating a new palette and immediately closing it would work, but I think what ended up happening was that then I had both the (ScriptUI-based) script palette and Illustrator both out of focus! Let us know if Carlos' solution works for you.

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jan 11, 2021 Jan 11, 2021

Copy link to clipboard

Copied

oh good point, closing the window might yield a different result. 

Likes

translate

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines