|  | 
 
| 本帖最后由 FOXY_FOX 于 2023-8-1 07:53 编辑 
 原作者地址
 【便宜创作】只有681字节的稗田阿求趋势倒计时【东方吧】_百度贴吧
 https://tieba.baidu.com/p/8529246171?pn=1
 
 
  这个是效果图 
  代码如下(1代)
 Function UnixTime()
 Set objWMIService = _
 GetObject("winmgmts:\\.\root\cimv2")
 Set colItems = objWMIService.ExecQuery _
 ("Select * from Win32_OperatingSystem",,48)
 For Each objItem in colItems
 TimeZone = objItem.CurrentTimeZone
 Next
 UnixTime = DateDiff("s", "01/01/1970 00:00:00", Now())
 UnixTime = UnixTime - TimeZone * 60
 End Function
 timerest = 1722956400-unixtime
 x1=timerest\86400
 timerest2=timerest-x1*86400
 x2=timerest2\3600
 timerest3=timerest2-x2*3600
 x3=timerest3\60
 x4=timerest3-x3*60
 msgbox "现在是" & date & " " & time & chr(13)+ chr(10) & "距离稗田阿求趋势还有" & x1 & "天" & x2 & "小时" & x3 & "分" & x4 & "秒", 48 , "稗田阿求趋势倒计时"
 将以上内容输入txt文件保存,后缀名改为VBS即可
 
 部分电脑可能出现无故报错的情况(其实是无故报错还是真的不兼容我也不知道)
 
  (大概是这个样子) 解决办法一:
 将编码改为ANSI
 
  图一针对Notepad++
 
   
 
  图二针对记事本
 
   
 解决方法二
 换用代码:稗田阿求趋势倒计时2.0(阿求:这种东西不要再更新了啊!!!)
 Function UnixTime()
 Set objWMIService = _
 GetObject("winmgmts:\\.\root\cimv2")
 Set colItems = objWMIService.ExecQuery _
 ("Select * from Win32_OperatingSystem",,48)
 For Each objItem in colItems
 TimeZone = objItem.CurrentTimeZone
 Next
 UnixTime = DateDiff("s", "01/01/1970 00:00:00", Now())
 UnixTime = UnixTime - TimeZone * 60
 End Function
 timerest = 1722956400-unixtime
 x1=timerest\86400
 timerest2=timerest-x1*86400
 x2=timerest2\3600
 timerest3=timerest2-x2*3600
 x3=timerest3\60
 x4=timerest3-x3*60
 limited = unixtime - 1576800000
 rebirth = 3299756400 - unixtime
 y0=rebirth\31536000
 yoll=y0+50
 rebirth0=rebirth-31536000*y0
 y1=rebirth0\86400
 rebirth1=rebirth0-86400*y1
 y2=rebirth1\3600
 rebirth2=rebirth1-3600*y2
 y3=rebirth2\60
 y4=rebirth2-60*y3
 if unixtime < 1722956401 then
 msgbox "现在是" & date & " " & time & chr(13)+ chr(10) & "距离稗田阿求趋势还有" & x1 & "天" & x2 & "小时" & x3 & "分" & x4 & "秒", 48 , "稗田阿求趋势倒计时"
 else
 msgbox "现在是" & date & " " & time & chr(13)+ chr(10) & "距离第十代御阿礼之子诞生还有" & yoll & "年" & y1 & "天" & y2 & "小时" & y3 & "分" & y4 & "秒", 64 , "第十代御阿礼之子诞生倒计时"
 end if
 
 
 再放一次原作者地址
 【便宜创作】只有681字节的稗田阿求趋势倒计时【东方吧】_百度贴吧
 https://tieba.baidu.com/p/8529246171?pn=1
 
 
 | 
 |