Copy link to clipboard
Copied
I'm reposting this as a standalone post to make it easier for anyone to find and use.
A user asked in this thread about a keyboard shortcut to zoom to a selected object in Adobe Illustrator the way many 3D drawing tools can. Of course, Illustrator will zoom toward/away from a selected object using CMD/CTRL plus/minus, which is what I initially told the original poster. I learned that wasn't as convenient as the OP wanted, so I built the way they wanted.
Using my below script you can...
And, you can assign the function a keyboard shortcut to make it work as easily as CMD+0/CTRL+0.
Thanks to @RP_Schmidt for giving me an interesting challenge to solve, especially since JavaScript programming is decidedly not my forte.
----------------------------------------
Zoom to Selected Object in Adobe Illustrator
Version 1.0 | 2025-04-06
by Pariah Burke, Adobe Community Professional, https://iampariah.com
First, download the script and the installation instructions, then follow the below (or included) instructions to add it to Illustrator and to bind it to a keyboard shortcut:
This script centers the view on the currently selected object(s) and adjusts the zoom so that the selection fits within the active artboard.
----------------------------------------
Installation
----------------------------------------
For Mac
Place the PSBZoomToSelected.jsx file into the Illustrator Scripts folder located at:
/Applications/Adobe Illustrator 2025/Presets.localized/en_US/Scripts
(Adjust the language folder if needed.)
----------------------------------------
For Windows
Place the PSBZoomToSelected.jsx file into the Illustrator Scripts folder, typically located at:
C:\Program Files\Adobe\Adobe Illustrator 2025\Presets\en_US\Scripts
----------------------------------------
Bind the Script to a Keyboard Shortcut
----------------------------------------
Go to Window > Actions.
----------------------------------------
Run the Script
----------------------------------------
You can now execute the script either via the assigned keyboard shortcut or by navigating to File > Scripts > PSBZoomToSelected.
----------------------------------------
By following these instructions, you’ll have the PSBZoomToSelected.jsx script installed and accessible via your custom keyboard shortcut in Adobe Illustrator 2025 on both Mac and Windows. Enjoy better zooming!
Here are the usage and installation instructions in video form:
Copy link to clipboard
Copied
Thank you for sharing your scrpt!
Copy link to clipboard
Copied
Wow, thank you very much!!!!
I've been on a development sprint for the last two weeks trying to catch up on projects, but I will definitely be adding this to illustrator and saving the installation instructions and script to my external folder for safekeeping (and in the event I have to reinstall).
I really appreciate the time you put into this and the consideration!
Copy link to clipboard
Copied
You're welcome! I hope it makes Illustrator a little easier to work with.
Copy link to clipboard
Copied
Here are the usage and installation instructions in video form: