Perhaps not the cleanest code, this returns the alignment of a selected text, which you can apply to your selected texts in the codes above,
(defun gettextalign ( txtset / txtset Edata ptx_old pty_old pty_new ptx_new mycons)
;; (setq txtset (ssget '((0 . "*TEXT"))))
(setq Edata (entget (ssname txtset 0)))
(setq mycons 10)
(if (/= 0 (nth 1 (cdr (assoc 11 Edata))))(setq mycons 11))
(setq ptx_old (nth 1 (assoc mycons Edata)))
(setq pty_old (nth 2 (assoc mycons Edata)))
(command "_.justifytext" txtset "" "MC")
(setq Edata (entget (ssname txtset 0)))
(setq ptx_new (nth 1 (assoc mycons Edata)))
(setq pty_new (nth 2 (assoc mycons Edata)))
(if (< ptx_old ptx_new)(setq alignx "L"))
(if (> ptx_old ptx_new)(setq alignx "R"))
(if (= ptx_old ptx_new)(setq alignx "C"))
(if (> pty_old pty_new)(setq aligny "T"))
(if (< pty_old pty_new)(setq aligny "B"))
(if (= pty_old pty_new)(setq aligny "M"))
(setq xyalign (strcat aligny alignx))
(command "_.justifytext" txtset "" xyalign)
xyalign
)