好东西啊,正在学习中,谢谢发布
正好在找同步對時的方法
http://www.autoitx.com/?fromuid=7655462更多资料查看这里~
新手学习学习
回复 1# 风行者
;简单的取网络时间判断软件是否过期
#include <Date.au3>
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$ShiYongShiJianXianZhi="1";有效期1天
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
$JiSuanShiFouDaoQi = _DateDiff( 'd',_Hdate()&" 00:00:00",_NowCalc())
If $JiSuanShiFouDaoQi >$ShiYongShiJianXianZhi Or $JiSuanShiFouDaoQi <0Then
MsgBox( 4096, "软件过期", "请向作者购买新的激活码" )
Exit
EndIf
MsgBox(0,"",_Hdate())
Func _Hdate()
Local $oHTTP,$H_time,$str,$Date
Local $mon=
$oHTTP = ObjCreate("microsoft.xmlhttp")
$oHTTP.Open("get","http://v.time.org.cn/com/",false)
$oHTTP.setRequestHeader("ver", "1.2")
$oHTTP.Send()
$str = StringTrimLeft($oHTTP.getResponseHeader("Date"),4)
For $i = 1 To 12
$str = StringReplace($str,$mon[$i],$i)
Next
$str = StringSplit($str," ")
$H_time = StringLeft($str,2) + 8
If $H_time >=24 Then $H_time -= 24
$H_time &= StringTrimLeft($str,2)
$Date = $str&"/"&$str&"/"&$str;&" "&$H_time
Return $Date
EndFunc
;根据 http://www.autoitx.com/forum.php?mod=viewthread&tid=16328修改
;
这个不是很好啊。
这个不错..
新手学习了~~~~~~~~~~
研究下,谢谢分享
回复风行者
发现一个小问题,一直弄不明白,
问题: 先运行一下你的脚本,显示出时间了,显示:(2 ...
qq123123 发表于 2011-1-9 22:55 http://www.autoitx.com/images/common/back.gif
我也发现这个问题,原因可能在那台时间服务器上。。。。我也想弄明白究竟是怎么一回事
很不错!谢谢楼主分享!
不知道是不是后台的学习下
{:face (84):}收藏嘞..支持下~~
支持一下,学习
挺好的代码~~~