Here is a sample solution of align objects:
var refBnds = app.activeDocument.selection.geometricBounds; var tg = app.activeDocument.selection; var ct = refBnds + (refBnds - refBnds) / 2; var md = refBnds + (refBnds - refBnds) / 2; var wd = tg.width; var ht = tg.height; tg.position = [ct - wd / 2, md + ht / 2];
There are big difference between PS and AI. You can read references below:
you can record actions for align.
this gives them a keyboard shortcut.
True. Downside is that you can only keybind to the function buttons F1-F12.
But then I realized that Illustrator is really stupid in this sense because compared to Photoshop, you cannot assign keybinds to custom scripts anyway! -_-
This is a point of frustration for nearly all of us here.
you can add a script to an action then keybind that action.
but is will not be persistent on restart.
you might be best with an addon to run scripts.
Script bay works well,
Ten-A has written one that I have still yet to test, sorry Ten-A.
and silly-V also has a good script that can manage your script running.
let me know if you need me to find the links to any of those