你好
在旧的IE和其他浏览器中,这种类型的url没有问题。http://用户名:password@server/布隆。提取
但是,由于一些M$update u不能在IE中再使用它。是的,autocad正在使用IE引擎。
感谢renderman提供这段精彩的代码
- (defun L12_GetFileFromURL (url path / utilObj tempPath newPath)
- ;; © RenderMan 2011, CADTutor.net
- ;; Example: (download "http(s)://username:password@server/source.ext" (getvar 'dwgprefix))
- (vl-load-com)
- (setq utilObj (vla-get-utility
- (vla-get-activedocument (vlax-get-acad-object))))
- (if (= :vlax-true (vla-isurl utilObj url))
- (if (vl-catch-all-error-p
- (vl-catch-all-apply
- 'vla-GetRemoteFile
- (list utilObj url 'tempPath :vlax-true)))
- (prompt "\n <!> Error Downloading File From URL <!> ")
- (progn
- (if (findfile
- (setq newPath
- (strcat path
- (vl-filename-base url)
- (vl-filename-extension url))))
- (vl-file-rename
- newPath
- (setq voidPath
- (strcat
- (vl-filename-directory newPath)
- "\\void_"
- (vl-filename-base newPath)
- "_"
- (menucmd
- "M=$(edtime,$(getvar,date),YYYY-MO-DD-HH-MM-SS)")
- (vl-filename-extension newPath)))))
- (vl-file-copy tempPath newPath)
- (vl-file-delete tempPath)))
- (prompt "\n <!> Invalid URL <!> "))
- (vl-catch-all-apply 'vlax-release-object (list utilObj))
- (princ)
- )
是否可以从lisp中的安全http位置下载文件?
或者可以在这里找到解决我的litle(LOL)问题的方法吗
有关m主题的更多信息$
http://support.microsoft.com/kb/834489 |