也许这也能有所帮助
它将记住上次使用的搜索路径
- ;Date : 19:11 19/01/2009
- ;;Add to start of routine
- ;;Load active x support
- (vl-load-com)
- ;;Set the default directory for the first time the routine is loaded
- (or dir (setq dir "C:/data08/")) ;;"C:/data08/" can be changed to any path as a default
- ;;Verify that the directory is a valid one otherwise set it to the C drive
- (or (vl-file-directory-p dir)(setq dir "C:/"))
- (setq fname(getfiled "specify output file" dir "xyz" 1))
- ;(setq file (open fname "w"))
- ;(close file)
- ;;Add to end of routine
- ;;Store the path for the next time the routine is run
- (setq dir (vl-filename-directory fname))
恐怕我不确定为什么Getfield在阅读路径时遇到问题。。
-杰米 |