Skip to main content
Flowgun
Inspiring
November 13, 2025
Answered

please Give us "app.currentTool" !

  • November 13, 2025
  • 2 replies
  • 232 views

hello Adobe,
While scripting, I oftentimes want to know what is the currently active tool, so that I change what my hotkeys do based on that.

For example, if I have the paint brush or the blob brush tools selected, then I want [ and ] (or other hotkeys) to change the brush size, but if I have other tools selected, then I want them to increase/decrease the width of currently-selected shapes. Another example would be to switch to the zoom tool using any given hotkey as long as it's held, and then go back to the tool that was currently selected, or we can use that to "spring-load" tools...

Just having "app.currentTool" (just like photoshop), even the tool name without any of its parameters, would open up a whole new world of possibilities for scripting, especially that now we have app.selectTool() . Exposing the tool functions within "app.currentTool" would elevate Illustrator a whole new level, but baby-steps, I guess. I'm not asking for much, am I?

Currently, I keep on tracking what tool is selected using variables in my script, but that can easily break if I change the tool using the toolbar for example.

Please, please, please please give us that

Correct answer CarlosCanto

I've got you

 

// get selected Tool
// carlos canto
// https://community.adobe.com/t5/illustrator-discussions/please-give-us-quot-app-currenttool-quot/m-p/15589529#M457890

// it errors when Selection Tools are active
// so do a try, catch to prevent it

alert(app.getSelectedToolName());

2 replies

CarlosCanto
Community Expert
CarlosCantoCommunity ExpertCorrect answer
Community Expert
November 13, 2025

I've got you

 

// get selected Tool
// carlos canto
// https://community.adobe.com/t5/illustrator-discussions/please-give-us-quot-app-currenttool-quot/m-p/15589529#M457890

// it errors when Selection Tools are active
// so do a try, catch to prevent it

alert(app.getSelectedToolName());
m1b
Community Expert
Community Expert
November 13, 2025

That's great Carlos!

 

(Bit of a shame that it can't handle the two most-used tools in Illustrator... sigh)

CarlosCanto
Community Expert
Community Expert
November 13, 2025

right?! it's baffling

m1b
Community Expert
Community Expert
November 13, 2025

Its a great idea @Flowgun but this is not the right place for feature requests (the right people won't see it here).

 

Go here and add it. (Unfortunately you will need to make a uservoice account to do so.) When you've made the request, come back here and post a link to the feature request you made and we can vote on it too.

Flowgun
FlowgunAuthor
Inspiring
November 13, 2025

Thanks! I didn't know about the uservoice website. the community has the "Feature request" and even the voting system so I thought this is the place.

m1b
Community Expert
Community Expert
November 13, 2025

Yes it is confusing. This is a user-to-user forum, so you're welcome to post feature requests here for other users to discuss, but if you want Adobe to see it, uservoice is the best bet at the moment. Uservoice is a very old crusty system that will be retired in next year or two I'd guess. Many other Adobe app forums have moved away from uservoice, but not Illustrator yet.