Lt Dan's legs Posted June 9, 2010 Share 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 Link to comment Share on other sites More sharing options...
alanjt Posted June 9, 2010 Share Posted June 9, 2010 (alert "first line\nsecond line") Quote Link to comment Share on other sites More sharing options...
fixo Posted June 9, 2010 Share 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 Link to comment Share on other sites More sharing options...
Lee Mac Posted June 9, 2010 Share 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 Link to comment Share on other sites More sharing options...
alanjt Posted June 9, 2010 Share Posted June 9, 2010 :lol: Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 9, 2010 Share Posted June 9, 2010 :lol: Quote Link to comment Share on other sites More sharing options...
alanjt Posted June 9, 2010 Share Posted June 9, 2010 Laughing at the two of you over complicating a simple question. Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted June 9, 2010 Author Share 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 Link to comment Share on other sites More sharing options...
alanjt Posted June 9, 2010 Share Posted June 9, 2010 "\"" .............. Quote Link to comment Share on other sites More sharing options...
Lt Dan's legs Posted June 9, 2010 Author Share Posted June 9, 2010 Thanks! I'm trying to write LISP routines. Trying Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted June 9, 2010 Share Posted June 9, 2010 See here Quote Link to comment Share on other sites More sharing options...
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.