Thanks Todd Kopriva for replying and thanks Erik Waluska for throwing light on the issue….yes I am an Illustrator user also and I did’nt realise that ‘create outlines’ doesnt change text to masks in Adobe After effects…It only creates paths on text to edit in both applications..Thank you so much….I converted my AE text layer to masks and successfully ran the script.
Before what I was doing on my AE text layer was Layer> create outlines and then running my script on that particular layer.A big error.
Thanks a lot.