getkword returns command command at prompt?

Sage Cowsert

Usenet Archive
Joined
Jul 25, 2003
Messages
44
Reaction score
0
(defun C:test
(INITGET "Numeric Text Options Reset Exit")
(GETKWORD "[Numeric/Text/Options/Reset] <Exit>: ")
(princ)
)

Returns:
[Numeric/Text/Options/Reset] <Exit>:
command:
command:

At the command line. Why? How do I get it not display both command:'s?

Thanks Sage
 
I'm ok with nil being an answer. Btw... Even with the 1 there I still get two commands returned at the command line.

Thanks Sage

Rudy Tovar said:
(initget 1 "Numeric Text Option Reset Exit")

Sage Cowsert said:
(defun C:test
(INITGET "Numeric Text Options Reset Exit")
(GETKWORD "[Numeric/Text/Options/Reset] <Exit>: ")
(princ)
)

Returns:
[Numeric/Text/Options/Reset] <Exit>:
command:
command:

At the command line. Why? How do I get it not display both command:'s?

Thanks Sage
 
You have to use a dummy (command ...) inside your otherwise commandless function, e.g.

(defun C:TEST
(setvar "cmdecho" 0)
(command "_.expert" (getvar "expert"))
(princ "\nTesting.")
(princ)
)
 

Latest threads

Back
Top