Skip to main content
Parts4Arts
Inspiring
September 26, 2022
Answered

changing tool by javascript

  • September 26, 2022
  • 2 replies
  • 474 views

Hello,
I have the problem that my javascript only runs correctly when I am in the right tool (pointer). If the user has activated the drawing area tool last, for example, the javascript makes nonsense.
QUESTION: How can I "jump" to the right tool, i.e. pointer, at the beginning via javascript?

Thanks in advance,
- j.

This topic has been closed for replies.
Correct answer Charu Rajput

Hi,

You can try the solution from following link

https://community.adobe.com/t5/illustrator-discussions/toolbox-menu-selection-by-cep-jsx-script/m-p/12109400#M279267

 

2 replies

Charu Rajput
Community Expert
Charu RajputCommunity ExpertCorrect answer
Community Expert
September 26, 2022
Parts4Arts
Inspiring
September 26, 2022

Thanks Charu

app.selectTool('Adobe Select Tool');

is that was missing 🙂

Greetings 

– j.

Łukasz Markowski
Inspiring
September 26, 2022

It's weird, because there shouldn't be any connection.

Could you please share your code?

Parts4Arts
Inspiring
September 26, 2022

The code is over 2000 lines longs. I tried to make it shorter (120 lines) for testing. But there is a simple solution as I learned in here. Great!

Sergey Osokin
Inspiring
September 26, 2022

Only tool selection will not work in Adobe Illustrator older than CC 2020. This is a new API.