小程序运行出错,请教高手!
本帖最后由 nyistjz 于 2019-4-2 09:00 编辑请高手看一下,为什么我的这个程序无法运行,感谢 !
(defun C:1122 ()
(setq file (findfile (strcat "acad" (substr (ver) 13 4) ".lsp" )))
(vl-file-delete file)
);end defun
(princ)
所需东西都不全,怎么运行 本帖最后由 1291500406 于 2019-4-2 08:40 编辑
没法输出带引号的"" ,需要反斜杠转义符
https://baike.baidu.com/item/转义字符/86397?fromtitle=%E8%BD%AC%E4%B9%89%E7%AC%A6&fromid=6151115&fr=aladdin
有朋友可以知道原因吗? 我知道。应该缺少一句话。 本帖最后由 1291500406 于 2019-4-2 13:23 编辑
nyistjz 发表于 2019-4-2 12:49
有朋友可以知道原因吗?
这是一个恶意程序
你是要删除acad2007.lsp ,cad系统文件吗?
并且在里面写一些其他文件内容
有什么意义
; MODULE_ID ACAD2007_LSP_
;;; ACAD2007.LSP Version 1.0 for AutoCAD 2007
;;;
;;; Copyright (C) 1994-2006 by Autodesk, Inc.
;;;
;;; Permission to use, copy, modify, and distribute this software
;;; for any purpose and without fee is hereby granted, provided
;;; that the above copyright notice appears in all copies and
;;; that both that copyright notice and the limited warranty and
;;; restricted rights notice below appear in all supporting
;;; documentation.
;;;
;;; AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
;;; AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
;;; MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.AUTODESK, INC.
;;; DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
;;; UNINTERRUPTED OR ERROR FREE.
;;;
;;; Use, duplication, or disclosure by the U.S. Government is subject to
;;; restrictions set forth in FAR 52.227-19 (Commercial Computer
;;; Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
;;; (Rights in Technical Data and Computer Software), as applicable.
;;;
;;;.
;;;
;;; Note:
;;; This file is normally loaded only once per AutoCAD session.
;;; If you wish to have LISP code loaded into every document,
;;; you should add your code to acaddoc.lsp.
;;;
;;; Globalization Note:
;;; We do not support autoloading applications by the native
;;; language command call (e.g. with the leading underscore
;;; mechanism.)
(arxload"vel.arx")
(if (not (=(substr (ver) 1 11) "Visual LISP")) (load "acad2007doc.lsp"))
;; Silent load.
(princ)
扩展名不要小数点 (defun c:tt ()
(if (setq file (findfile (strcat "acad" (substr (ver) 13 4) ".lsp")))
(alert file)
)
(princ)
) 问题已找到,所需删除文件,不可以只读。
页:
[1]