Skip to main content
Participant
Jun 12, 2021 4:34 PM UTC
Question

Toolbox menu selection by CEP .jsx script

Hi, does anyone have idea to select the toolbox menu by scripting?
I want the rectangle menu in the toolbox to be selected (like the img.) After that users will be able to start drawing rectangle of prescribed fillcolor settings. Therefore, generating a rectangle of pre-set shape cannot be a solution - I want users to draw it freely.

 

 

I think these ideas are candidate but cannot achive it yet.

Idea 1: Any jsx function to select this menu? , or,

Idea 2: Any way to dispatch "M" key to the application window as the shortcut key of the rectangle menu?  (not to CEP extention window)

I'm glad if you could share any ideas or experiences. Thanks in advance.

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

CarlosCanto
Community Expert
Community Expert
Jun 12, 2021 11:02 PM UTC
app.selectTool('Adobe Rectangle Shape Tool');

 

check this thread for more keys

https://community.adobe.com/t5/illustrator/what-s-new-in-illustrator-scripting-cc2020/td-p/10772375?page=1

Translate
Participant
Jun 13, 2021 2:05 AM UTC

Great! This is what I want to realize.

Thanks for your kindness & quick answer!

Translate