Lt Dan's legs Posted June 9, 2010 Posted June 9, 2010 I just wanted to have an alert pop up but want multiple lines. How do you make the text return to the right? example: (alert "Hi /p How are you?") result: Hi How are you? Quote
fixo Posted June 9, 2010 Posted June 9, 2010 I just wanted to have an alert pop up but want multiple lines. How do you make the text return to the right? example: (alert "Hi /p How are you?") result: Hi How are you? If you have list of text lines this will helps (defun build_alert (lst / text) (alert (substr (setq text (apply 'strcat (mapcar '(lambda (x) (strcat x "\n") ) lst ) ) ) 1 (1- (strlen text)) ) ) ) ;;usage (build_alert '("alpha" "bravo" "charlie" "delta" "echo" "fixo")) ~'J'~ Quote
Lee Mac Posted June 9, 2010 Posted June 9, 2010 (defun build_alert ( lst / lst->str ) (defun lst->str ( lst del ) (if (cdr lst) (strcat (car lst) del (lst->str (cdr lst) del)) (car lst) ) ) (alert (lst->str lst "\n")) ) Quote
alanjt Posted June 9, 2010 Posted June 9, 2010 Laughing at the two of you over complicating a simple question. Quote
Lt Dan's legs Posted June 9, 2010 Author Posted June 9, 2010 Thanks guys! I did go with /n How do I add " in LISP? Example: I'm overriding a dim and I'm inputing "w/nx6'-8"h I can get the words in but " throws my routine all off. Quote
Lt Dan's legs Posted June 9, 2010 Author Posted June 9, 2010 Thanks! I'm trying to write LISP routines. Trying Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.