LMAO, very nice KewlToyZ. How about combining it with a reactor so they can't get around it.
(vl-load-com)
(or explodereactor
(setq explodereactor
(vlr-command-reactor
nil
'((:vlr-commandwillstart . cmdstart)
(:vlr-commandended . cmdend)
(:vlr-commandcancelled . cmdcan)
)
) ;_ end of vlr-command-reactor
) ;_ end of setq
) ;_ end of or
(defun cmdstart (react cmd /)
(setq speak (vlax-create-object "Sapi.SpVoice"))
(setq cmd (strcase (car cmd) t))
(cond
((wcmatch cmd "*explode*")
(vlax-invoke speak "Speak" "I will drag you over hot coals if you do what I think you're about to do" 0)
)
)
(vlax-release-object speak)
) ;_ end of defun
(defun cmdend (react cmd /)
(setq speak (vlax-create-object "Sapi.SpVoice"))
(setq cmd (strcase (car cmd) t))
(cond
((wcmatch cmd "*explode*")
(vlax-invoke speak "Speak" "If you exploded any dimensions, m text or peelines, you are gone" 0)
)
)
(vlax-release-object speak)
) ;_ end of defun
(defun cmdcan (react cmd /)
(setq speak (vlax-create-object "Sapi.SpVoice"))
(setq cmd (strcase (car cmd) t))
(cond
((wcmatch cmd "*explode*")
(vlax-invoke speak "Speak" "Smart move, canceling out" 0)
)
)
(vlax-release-object speak)
) ;_ end of defun