马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 marting 于 2018-3-16 13:14 编辑
 - (defun XD::InterNet:GetUrl (url / XML http)
- (if
- (and
- (setq http (vlax-create-object "Microsoft.XMLHTTP"))
- (not
- (vl-catch-all-error-p
- (vl-catch-all-apply
- (function (lambda () (vlax-invoke http 'open "GET" url 0)))
- )
- )
- )
- (not (vl-catch-all-error-p
- (vl-catch-all-apply
- (function (lambda () (vlax-invoke http 'send)))
- )
- )
- )
- (= (vlax-get-property http "Status") 200)
- )
- (progn (setq XML (vlax-get http "responseText")))
- )
- (if http
- (vlax-release-object http)
- )
- XML
- )
命令: (xd::internet:geturl "http://baidu.com")
"<html>\n<meta http-equiv=\"refresh\"
content=\"0;url=http://www.baidu.com/\">\n</html>\n"
|