Copy link to clipboard
Copied
hello
from my understanding it is not possible to script that function Aling to > ket obj / artboard / selection
Is there any workaround ? it is very time consuming to click it for every object
lets say my key obj is always on the top layer and the object to align is one layer below.
i select both objects
How to automate that ?
I've looked thru scripts, and plugins but I'm not able to find anything yet.
This : https://sysys.blog.shinobi.jp/Entry/104/ for me is not working yet
the only thing I can think of is do a mouse capture macro to actually click the UI menus item + Jsx scripts hotkey to center it.
Quite inelegant
Any pointers would be greatly appreciated !
thx
Simply put, alignment/distribution is a rule-based get and set of coordinates. This can be achieved with scripts alone, without relying on the specialized functions provided in Illustrator.
I developed this script based on the concept.
Since the align and distribute process is written in my own code, alignment basis such as key object and artboard can also be handled by the script. This allows you to add keyboard shortcuts to it using other applications such as Keyboard Maestro or Karabiner-
...I'm not sure I 100% understand what you are asking but I have a script that matches multiple objects to a 'key' object. The 'key' object can be either the top of bottom object of the selection. The match options are POSITION, SIZE, ROTATION, LAYER. When I need to align something to the artboard, I just draw a rectangle the size of the artboard and use that as the 'key' object. Cheers!
Copy link to clipboard
Copied
Simply put, alignment/distribution is a rule-based get and set of coordinates. This can be achieved with scripts alone, without relying on the specialized functions provided in Illustrator.
I developed this script based on the concept.
Since the align and distribute process is written in my own code, alignment basis such as key object and artboard can also be handled by the script. This allows you to add keyboard shortcuts to it using other applications such as Keyboard Maestro or Karabiner-Elements.
For key object acquisition, it basically uses OnegaiSDK, which you linked to, but this does not work on Apple Silicon. So there is a workaround based on the rule "try the Illustrator alignment, and the one that doesn’t move is the key object".
Copy link to clipboard
Copied
thank you for the explanation !
well i was not able to make onegai work on latest AI version on w10 either.
But your scripts are interesting ! I'll dive into that as well to learn a bit more
Copy link to clipboard
Copied
I'm not sure I 100% understand what you are asking but I have a script that matches multiple objects to a 'key' object. The 'key' object can be either the top of bottom object of the selection. The match options are POSITION, SIZE, ROTATION, LAYER. When I need to align something to the artboard, I just draw a rectangle the size of the artboard and use that as the 'key' object. Cheers!
Copy link to clipboard
Copied
thank you, your script is also great !
and I love the AiCommandPalette as well !
very good job and a lot of use-cases to dig here
based on your code i was able to find what i needed. and automate that to a streamdeck XL
Thank you ! great code here 🙂
Copy link to clipboard
Copied
Glad to hear my script could help! I've been wanting a Streamdeck for my office. So many possibilities. Cheers!
Copy link to clipboard
Copied
it is awesome ! i use it very extensively for many use cases from office to live acts midi mapping. Daily with AI, (macros & shortcuts etc ..)
by any means, take a XL, thank me later 🙂
You can also look at Companion for streamdeck. It is another software to program the streamdeck with advanced possibilities. Streamdeck software is nice enough tho