Run the following code with a selected textframe
app.selection.parentStory.justification = Justification.RIGHT_ALIGN
If right justified is needed then use the following value for assignment
The different values that can be used are mentioned in the following link
Note that Manan's solution would do the alignment to every paragraph is all text frames linked to the text frame in question. If you just want to hit the paragraphs in a specific text frame, with the frame selected:
app.selection.paragraphs.everyItem().justification = Justification.RIGHT_ALIGN;
Manan & Brian
Thanks... understand... it works like I want!