注释是否在单独的文件中?
如果是这样,这只会将内容打印到命令行:
- (defun c:notes ( / file line )
- [color=red] (setq file "C:\\MyNotes.txt") ;; Filename of Notes file[/color]
- (cond
- ( (not (setq file (findfile file)))
- (princ "\n--> Notes File not Found.")
- )
- ( (not (setq file (open file "r")))
- (princ "\n--> Error Opening File.")
- )
- (t
- (while (setq line (read-line file)) (terpri) (princ line))
- (setq file (close file))
- (textscr)
- )
- )
- (princ)
- )
或者,您可以只打开文件:
- (defun c:notes2 ( / file )
- [color=red] (setq file "C:\\MyNotes.txt") ;; Filename of Notes file[/color]
- (if (setq file (findfile file))
- (startapp "notepad" file)
- (princ "\n--> Notes File not Found.")
- )
- (princ)
- )
在这两种情况下,更改标记为红色的部分以适合您的文件名。 |