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

用VBS读取系统当前时间!

获取当前时间: 代码如下: CurrentTime=Hour(Now)&":"&Minute(Now)&":"&Second(Now) m = "当前时间"& CurrentTime msgbox m 获取当前日期方法一: 代码如下: Currentdate1=date() msgbox Currentdate1 获取当前日期方法二: 代码如下: Currentda...

msgbox now

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

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

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"

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

VBS不能抓取系统的启动时间。

一楼不要胡乱回复,那是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....

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

rem okDim Y,Mon,D,W,h,m,s,SJ,fn//先声明变量Y=Year(Date):Mon=Month(Date):D=Day(Date):W=Weekday(Date,vbMonday)//利用VBS函数获得当前系统的年,月,日,星期 并各自保存到变量中h=Hour(time):m=Minute(time):s=Second(time)//利用VBS函数获得...

网站地图

All rights reserved Powered by www.fltk.net

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