很强大,看来还得找VBS的帮助文件。不然都不会用。。。
遇到了个小问题,请楼主帮忙解答:
- (defun GETSPECIALPATH (N / FSO PATH)
- (setq FSO (vlax-create-object "Scripting.FileSystemObject"))
- (setq PATH (vlax-get (vlax-invoke FSO 'GETSPECIALFOLDER N) 'PATH))
- (vlax-release-object FSO)
- PATH
- )
- (setq PATH (strcat (GETSPECIALPATH 1) "/scrrun.dll"))
- (if (not fc-alias)
- (vlax-import-type-library
- :tlb-filename PATH :methods-prefix
- "fm-" :properties-prefix
- "fp-" :constants-prefix "fc-"
- )
- )
- ;;=========
- (setq FSO (vlax-create-object "Scripting.FileSystemObject"))
- (setq F (fm-opentextfile
- "C: \\readme.txt"
- fc-forwriting
- fc-tristateusedefault
- )
- )
- (fm-write F "abc")
- (fm-close F)
- (and f (vlax-release-object f))
- (and FSO (vlax-release-object FSO))
(setq F (fm-opentextfile
"C: \\readme.txt"
fc-forwriting
fc-tristateusedefault
)
)
_$
参数类型错误: VLA-OBJECT "C: \\readme.txt"
|