No problem, BIGAL - I just remember that it returns a non-nil value (unless you hit ESC), since Tharwat mentioned this too many times.
Some of us "see" what you did there.
Writing it like this may be more readable (atleast for me) :
(if (= "" (getstring "All press A or justfor current ")) (command "zoom" "all" "zoom" ".95x") ;;Zooms to 95% of full screen (load "zoomalltabs")) So putting it all together, will this do the job?
(defun c:closer()(setq ans (getstring "All press A or justfor current ")) ;;ans = the key pressed;;If carriage return (or space) is pressed(cond ((= ans "") (command "zoom" "all" "zoom" ".95x") ;;Zooms to 95% of full screen );;else if A (or any other character) is pressed;;Loops through tabs and zooms each tab in turn(t (vlax-for x (vla-get-Layouts (vla-get-ActiveDocument (vlax-get-acad-object) ) ) (setq mylayout (vla-get-Name x)) (setvar "ctab" mylayout) (command "zoom" "all" "zoom" ".95x") )));;save and close the drawing (command "qsave") ;;saves the drawing (command "close" "y") ;;Closes the drawing
页:
1
[2]