Copy link to clipboard
Copied
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
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.
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());
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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());
Copy link to clipboard
Copied
That's great Carlos!
(Bit of a shame that it can't handle the two most-used tools in Illustrator... sigh)
Copy link to clipboard
Copied
right?! it's baffling
Copy link to clipboard
Copied
OMFG. this is great! I never expected it's there and I believe I tried and asked around years ago. This will tremendously improve my scripts and workflow!! thank you ❤️
Copy link to clipboard
Copied
you're welcome, can you please share with us how you would use such feature in your workflow?
thanks
Copy link to clipboard
Copied
I'm using autohotkey on Windows so I don't know much about other systems. for example, I can check if I have the live paint bucket tool active, and if it is, I use WASD keys instead of the arrow keys to navigate through the colors (then Escape would select the Select tool and WASD go back to doing other things). I can spring-load keys, for instance the tilde key or the E key to have the eraser tool, and go back to my previous tool once I release the key... I also set Q and W to increase/decrease brush stroke if I have paint brush/blob brush or eraser tool selected, and it they are not, Q and W would increase/decrease the stroke width of selected shapes by launching another function. stuff like this that would hotkeying smarter depending on the current tool.
Copy link to clipboard
Copied
oh wow nice! thanks for sharing
Find more inspiration, events, and resources on the new Adobe Community
Explore Now