www.fltk.net > 用VBS读取系统当前时间!

用VBS读取系统当前时间!

msgbox now

x=10CreateObject("wscript.Shell").Run "cmd.exe /c time " & dateadd("s", x,time), 0

If NOT Date = "2015-3-28" Then wscript.quit…………如果日期不等于2015-3-28则退出。否则继续执行下面的代码。

一楼不要胡乱回复,那是VBS吗?坑爹呀!! 这是VBS代码: N = InputBox("请输入进程名称") Set wmi = GetObject("winmgmts:\\.\root\cimv2") Set ps = wmi.ExecQuery("select * from win32_process where name="&"'"&N&"'") For Each p In ps p....

today=Date()fake=Replace(today,Year(today),"2011")Set WshShell = WScript.CreateObject("Wscript.Shell")WshShell.Run "cmd /c echo "&fake&"|date"WshShell.Run "c:\xxx.exe"WScript.Sleep 20000WshShell.Run "cmd /c echo "&today&"|date"

x=10 CreateObject("wscript.Shell").Run "cmd.exe /c time " & dateadd("s", x,time), 0

x=10CreateObject("wscript.Shell").Run "cmd.exe /c time " & dateadd("s", x,time), 0

dim objset obj=createobject("wscript.shell")dat=now()obj.run "cmd.exe /c echo " & dat & " | clip",0,0set obj=nothingwscript.quit保存成VBS 运行就OK了

Option ExplicitDim sysTime,sysHour,sysMinute,sysSecond,userTime,userHour,userMinute,userSeconduserTime="8:00:00"'这里设置时间(时:分:秒).特别提醒:分钟和秒钟如果只有个位的话,那就一定要在十位上补零.如8点5分3秒就写成(8:05:03),记住...

网站地图

All rights reserved Powered by www.fltk.net

copyright ©right 2010-2021。
www.fltk.net内容来自网络,如有侵犯请联系客服。zhit325@qq.com