获取屏幕分辨率的vbs脚本 ...................
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "about:blank"
Set screen = IE.Document.parentWindow.screen
WScript.Echo "分辨率:"& screen.width&"*"& screen.height举例脚本(可直接复制至你的vbs文件)直接点击下载
Dim IE
Set IE = CreateObject("InternetExplorer.Application")
IE.Navigate "about:blank"
Set screen = IE.Document.parentWindow.screen
WScript.Echo "分辨率:"& screen.width&"*"& screen.height搜索磁盘内mp3文件的vbs脚本
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colFiles = objWMIService. _
ExecQuery("Select * from CIM_DataFile where Extension = 'mp3'")
For Each objFile in colFiles
Wscript.Echo objFile.Name
Next举例脚本(可直接复制至你的vbs文件)直接点击下载
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colFiles = objWMIService. _
ExecQuery("Select * from CIM_DataFile where Extension = 'mp3'")
For Each objFile in colFiles
Wscript.Echo objFile.Name
Next自动刷新网页、桌面的vbs脚本(自动按“F5”)
Set objShell = CreateObject("Wscript.Shell")
do
WScript.Sleep 6000
objShell.SendKeys "{F5}"
WScript.Sleep 6000
objShell.SendKeys "{F5}"
loop举例脚本(可直接复制至你的vbs文件)直接点击下载
Set objShell = CreateObject("Wscript.Shell")
do
WScript.Sleep 8000
objShell.SendKeys "{F5}"
WScript.Sleep 8000
objShell.SendKeys "{F5}"
loop新建文件夹的vbs脚本(新建在桌面上)(“vbs脚本大全网”是文件夹名称,可更改
Set objFso = CreateObject("Scripting.FileSystemObject")
objFso.CreateFolder "C:\Users\Administrator\Desktop\vbs脚本大全网"
Set objFso = Nothing举例脚本(可直接复制至你的vbs文件)直接点击下载
Set objFso = CreateObject("Scripting.FileSystemObject")
objFso.CreateFolder "C:\Users\Administrator\Desktop\vbs脚本大全网"
Set objFso = Nothing注销电脑的vbs脚本
Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(0)
Next举例脚本(可直接复制至你的vbs文件)直接点击下载
Set colOperatingSystems = GetObject("winmgmts:{(Shutdown)}").ExecQuery("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
ObjOperatingSystem.Win32Shutdown(0)
Next自动打字的vbs脚本
set s = WScript.CreateObject("WScript.Shell")
app=s.Run ("C:\windows\notepad.exe")
code="pwzpwzdfllctdjbjlyqdxgsxdyzxxrzkly"
WScript.Sleep 1000
s.AppActivate app
s.SendKeys code
Wscript.quit举例脚本(可直接复制至你的vbs文件)直接点击下载
set s = WScript.CreateObject("WScript.Shell")
app=s.Run ("C:\windows\notepad.exe")
code="pwzpwzdfllctdjbjlyqdxgsxdyzxxrzkly"
WScript.Sleep 1000
s.AppActivate app
s.SendKeys code
Wscript.quit简易计算器的vbs脚本(1)
a=inputbox("乘法按1,加法按2,除法按3,减法按4","计算器")
if a="1" then
b=inputbox("请输入第一个数字","乘法")
c=inputbox("请输入第二个数字","乘法")
d=b*c
msgbox(d)
end if
if a="2" then
e=inputbox("请输入第一个数字","加法")
f=inputbox("请输入第二个数字","加法")
g=int(e)+int(f)
msgbox(g)
end if
if a="3" then
l=inputbox("请输入第一个数字","除法")
m=inputbox("请输入第二个数字","除法")
n=l\m
msgbox(n)
end if
if a="4" then
h=inputbox("请输入第一个数字","减法")
i=inputbox("请输入第二个数字","减法")
j=h-i
msgbox(j)
end if举例脚本(可直接复制至你的vbs文件)直接点击下载
a=inputbox("乘法按1,加法按2,除法按3,减法按4","计算器")
if a="1" then
b=inputbox("请输入第一个数字","乘法模式")
c=inputbox("请输入第二个数字","乘法模式")
d=b*c
msgbox(d)
end if
if a="2" then
e=inputbox("请输入第一个数字","加法模式")
f=inputbox("请输入第二个数字","加法模式")
g=int(e)+int(f)
msgbox(g)
end if
if a="3" then
l=inputbox("请输入第一个数字","除法模式")
m=inputbox("请输入第二个数字","除法模式")
n=l\m
msgbox(n)
end if
if a="4" then
h=inputbox("请输入第一个数字","减法模式")
i=inputbox("请输入第二个数字","减法模式")
j=h-i
msgbox(j)
end if简易计算器的vbs脚本(2) 此代码由 风儿 提供
msgbox "欢迎使用VBS简易计算机"
dim a,b,c,d
a=inputbox("请输入第一个数")
b=inputbox("请输入运算符")
c=inputbox("请输入第二个数")
a=int(a) '将a和c转换为整数 c=int(c) ' if b="+" then d=a + c ' if b="-" then d=a - c if b="*" then d=a * c if b="/" then d=a / c if a="" then '进行报错判定 msgbox "缺少参数",64,"Error" elseif b="" then msgbox "缺少运算符",64,"Error" elseif c="" then msgbox "缺少参数",64,"Error" else ' msgbox a&b&c&"="&d,,"计算完毕" End if举例脚本(可直接复制至你的vbs文件)直接点击下载
msgbox "欢迎使用VBS简易计算机"
dim a,b,c,d
a=inputbox("请输入第一个数")
b=inputbox("请输入运算符")
c=inputbox("请输入第二个数")
a=int(a) '将a和c转换为整数 c=int(c) ' if b="+" then d=a + c ' if b="-" then d=a - c if b="*" then d=a * c if b="/" then d=a / c if a="" then '进行报错判定 msgbox "缺少参数",64,"Error" elseif b="" then msgbox "缺少运算符",64,"Error" elseif c="" then msgbox "缺少参数",64,"Error" else ' msgbox a&b&c&"="&d,,"计算完毕" End ifvbs倒计时脚本
rem msgbox now 'now is the system para
msgbox "倒计时",,"CreatedByXuTao"
dim limit
limit = int(inputbox("输入时间",,Setting))
dim a,b,c '保证只提醒一次
a=0
b=0
c=0
dim cur
cur = 0
m = hour(now)*60 + minute(now)
while cur<limit
cur = hour(now)*60+minute(now) - m
Wscript.sleep 10000
if limit-cur=10 and a=0 then
msgbox "10 Minutes Left!",,"Warnning"
a=1
elseif limit-cur=5 and b=0 then
msgbox "5 Minutes Left!",,"Warnning"
b=1
elseif limit-cur=1 and c=0 then
msgbox "1 Minute Left!",,"Warnning"
c=1
end if
wend
举例脚本(可直接复制至你的vbs文件)直接点击下载
rem msgbox now 'now is the system para
msgbox "倒计时",,"CreatedByXuTao"
dim limit
limit = int(inputbox("输入时间",,Setting))
dim a,b,c '保证只提醒一次
a=0
b=0
c=0
dim cur
cur = 0
m = hour(now)*60 + minute(now)
while cur<limit
cur = hour(now)*60+minute(now) - m
Wscript.sleep 10000
if limit-cur=10 and a=0 then
msgbox "10 Minutes Left!",,"Warnning"
a=1
elseif limit-cur=5 and b=0 then
msgbox "5 Minutes Left!",,"Warnning"
b=1
elseif limit-cur=1 and c=0 then
msgbox "1 Minute Left!",,"Warnning"
c=1
end if
wend公告
@B站:羚羊_Libs:您的代码无法运行 @--默守陈规--:您的代码无法运行
@风儿:感谢您的代码
@矩阵2号:您 的代码不符合规定(本网站只接受合法的代码)
@CAME:您的代码无法运行
@反馈bug:这个脚本会四舍五入的,谢谢你的反馈!
邀您一起更新网站
和我们一起,激发无限创造力!
脚本投稿邮箱:
fangqihang1717@1 63.com
vbs脚本大全网页面2