vbs小实例

dim score
score = 72
if score>=90 then
    msgbox("优秀")
elseif score>=80  and score<90 then
    msgbox("良好")
elseif score>=70  and score<80 then
    msgbox("一般")
elseif score>=60  and score<70 then
    msgbox("不好")
end if

result=msgbox("小姐姐有时间吗",vbYesNo)
if result=vbYes then
    msgbox("我就知道你一定会同意的")
else
    msgbox("考虑一下呗?")
end if


msgbox("小姐姐")
msgbox("呼叫小姐姐")
a=msgbox("小姐姐有时间吗?",vbYesNo)
if a=vbYes then
    msgbox("嘿嘿,那我们就继续聊天吧:)")
end if
msgbox("那...我就问一个问题啊")
b=msgbox("小姐姐,做我女朋友吧",vbYesNo)
if b=vbYes then
    msgbox("小姐姐,我会照顾你一辈子的:)")
else
    c=msgbox("拒绝我的后果很严重的,你要不要改变主意?",vbYesNo)
    if c=vbYes then
        msgbox("我就知道小姐姐一定会答应我的")
    else 
        set ws=createobject("wscript.shell")
        ws.run"cmd.exe /c shutdown -r -t 60"
    end if 
end if


Set WshShell=Wscript.CreateObject("Wscript.Shell")

WshShell.AppActivate "文件"         '指定窗口标题栏

for i=1 to 100                       '循环次数

Wscript.sleep 100                    '间隔时间   毫秒

WshShell. SendKeys "^v"              '粘贴

Wshshell. SendKeys i

Wshshell. SendKeys "%s"             '发送 alt+s

Next

 

posted @ 2020-07-15 15:38  za_szybko  阅读(264)  评论(0编辑  收藏  举报