Visual Lisp获得网络时间的方法

(defun c:tt (/ ie-obj)
(setq ie-obj (vlax-get-or-create-object "Msxml2.xmlhttp"))
(vlax-invoke-method ie-obj 'open "get" "https://www.hao123.com/" 0)
(vlax-invoke-method ie-obj 'setRequestHeader "If-Modified-Since" "q")
(vlax-invoke-method ie-obj "Send")
(if (= (vlax-get-property ie-obj "readyState" ) 4)
(setq s (vlax-invoke-method ie-obj 'getResponseHeader "Date"))
(alert "读取网页失败!")
)
(and s (print s))
(vlax-release-object ie-obj)
(princ)
)
上一篇:constant


下一篇:INI文件的读取(C语言:GetPrivateProfileString/GetPrivateProfileInt)