Extendscript: Set window focus on Illustrator

Explorer ,
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

77

Likes

Translate

Translate

Report

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

1 Correct Answer

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

Likes

Translate

Translate
Jump to answer Jump to answer
Adobe Community Professional ,
Jan 11, 2021

Copy link to clipboard

Copied

try this

 

BridgeTalk.bringToFront("illustrator")

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Works perfectly. Thanks!

 

How did you know about this?

Likes

Translate

Translate

Report

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

Copy link to clipboard

Copied

It's in the Illustrator Tools Guide.pdf

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
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

Report

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

Copy link to clipboard

Copied

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

Likes

Translate

Translate

Report

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