Thanks for your response Greg.
The Align panel works only for aligning multiple layers. In my case, there is only one shape layer which contains multiple shapes. I need to align these shapes within one layer.
As there is only one layer, the Align panel won’t work.
Thanks for the script. I will go through it.