求简单的vbs代码
个人收藏的,给你了。
1.VBS获取路径集合
1.1.VBS获取系统安装路径
程序代码
set WshShell = WScript.CreateObject("WScript.Shell")
strWinDir = WshShell.ExpandEnvironmentStrings("%WinDir%")
上面的代码意思是先定义这个变量是获取系统安装路径的,然后我们用"strWinDir"调用这个变量。
1.2.C:\Program Files路径
程序代码
msgbox CreateObject("WScript.Shell").ExpandEnvironmentStrings("%ProgramFiles%")
1.3.C:\Program Files\Common Files路径
程序代码
msgbox CreateObject("WScript.Shell").ExpandEnvironmentStrings("%CommonProgramFiles%")
2.给桌面添加网址快捷方式
程序代码
set gangzi = WScript.CreateObject("WScript.Shell")
strDesktop = gangzi.SpecialFolders("Desktop")
set oShellLink = gangzi.CreateShortcut(strDesktop "\Internet Explorer.lnk")
oShellLink.TargetPath = "http://www.9934.cn"
oShellLink.Description = "Internet Explorer"
oShellLink.IconLocation = "%ProgramFiles%\Internet Explorer\iexplore.exe, 0"
oShellLink.Save
3.给收藏夹添加网址
程序代码
Const ADMINISTRATIVE_TOOLS = 6
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(ADMINISTRATIVE_TOOLS)
Set objFolderItem = objFolder.Self
Set objShell = WScript.CreateObject("WScript.Shell")
strDesktopFld = objFolderItem.Path
Set objURLShortcut = objShell.CreateShortcut(strDesktopFld "\小游戏网站.url")
objURLShortcut.TargetPath = "http://www.4000.cc/?ie"
objURLShortcut.Save
4.删除指定目录指定后缀文件
程序代码
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
fso.DeleteFile "C:\*.vbs", True
Set fso = Nothing
上面代码为删除C盘根目录下后缀为vbs的文件
5.VBS改主页
程序代码
Set oShell = CreateObject("WScript.Shell")
oShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page","http://www.654.la"
6.VBS加启动项
程序代码
Set oShell=CreateObject("Wscript.Shell")
oShell.RegWrite "HKLM\Software\Microsoft\Windows\CurrentVersion\Run\cmd","cmd.exe"
7.VBS复制自己
程序代码
set copy1=createobject("scripting.filesystemobject")
copy1.getfile(wscript.scriptfullname).copy("c:\huan.vbs")
复制自己到C盘的huan.vbs
程序代码
set copy1=createobject("scripting.filesystemobject")
copy1.getfile("game.exe").copy("c:\gangzi.exe")
复制本vbs目录下的game.exe文件到c盘的gangzi.exe
8.VBS获取系统临时目录
程序代码
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
Dim tempfolder
Const TemporaryFolder = 2
Set tempfolder = fso.GetSpecialFolder(TemporaryFolder)
Wscript.Echo tempfolder
9.就算代码出错 依然继续执行
程序代码
On Error Resume Next
10.VBS打开网址
程序代码
Set objShell = CreateObject("Wscript.Shell")
objShell.Run("http://www.4000.cc/")
11.VBS发送邮件
程序代码
NameSpace = "http://schemas.microsoft.com/cdo/configuration/"
Set Email = CreateObject("CDO.Message")
Email.From = "发件@qq.com"
Email.To = "收件@qq.com"
Email.Subject = "Test sendmail.vbs"
Email.Textbody = "OK!"
Email.AddAttachment "C:\1.txt"
With Email.Configuration.Fields
.Item(NameSpace"sendusing") = 2
.Item(NameSpace"smtpserver") = "smtp.邮件服务器.com"
.Item(NameSpace"smtpserverport") = 25
.Item(NameSpace"smtpauthenticate") = 1
.Item(NameSpace"sendusername") = "发件人用户名"
.Item(NameSpace"sendpassword") = "发件人密码"
.Update
End With
Email.Send
12.VBS结束进程
程序代码
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" strComputer "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'Rar.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
13.VBS隐藏打开网址
13.1.部分浏览器无法隐藏打开,而是直接打开,适合主流用户使用
程序代码
createObject("wscript.shell").run "iexplore http://www.gangzi.org/",0
13.2.兼容所有浏览器,使用IE的绝对路径+参数打开,无法用函数得到IE安装路径,只用函数得到了Program Files路径,应该比上面的方法好,但是两种方法都不是绝对的。(本方法由刚子原创)
程序代码
Set objws=WScript.CreateObject("wscript.shell")
objws.Run """C:\Program Files\Internet Explorer\iexplore.exe""www.baidu.com",vbhide
14.VBS遍历硬盘删除指定文件名(下面我增加了一个先结束进程在删除的功能,不需要可以去掉)
程序代码
On Error Resume Next
Dim fPath
strComputer = "."
Set objWMIService = GetObject _
("winmgmts:\\" strComputer "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'gangzi.exe'")
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Set objWMIService = GetObject("winmgmts:" _
"{impersonationLevel=impersonate}!\\" strComputer "\root\cimv2")
Set colDirs = objWMIService. _
ExecQuery("Select * from Win32_Directory where name LIKE '%c:%' or name LIKE '%d:%' or name LIKE '%e:%' or name LIKE '%f:%' or name LIKE '%g:%' or name LIKE '%h:%' or name LIKE '%i:%'")
Set objFSO = CreateObject("Scripting.FileSystemObject")
For Each objDir in colDirs
fPath = objDir.Name "\gangzi.exe"
objFSO.DeleteFile(fPath), True
Next
15.VBS获取网卡MAC地址
程序代码
Dim mc,mo
Set mc=GetObject("Winmgmts:").InstancesOf("Win32_NetworkAdapterConfiguration")
For Each mo In mc
If mo.IPEnabled=True Then
MsgBox "本机网卡MAC地址是: " mo.MacAddress
Exit For
End If
Next
16.VBS获取本机注册表主页地址
程序代码
Set reg=WScript.CreateObject("WScript.Shell")
startpage=reg.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page")
MsgBox startpage
17.VBS遍历所有磁盘的所有目录,找到所有.txt的文件,然后给所有txt文件最底部加一句话。
程序代码
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
Co = VbCrLf "路过。。。"
For Each i In fso.Drives
If i.DriveType = 2 Then
GF fso.GetFolder(i "\")
End If
Next
Sub GF(fol)
Wh fol
Dim i
For Each i In fol.SubFolders
GF i
Next
End Sub
Sub Wh(fol)
Dim i
For Each i In fol.Files
If LCase(fso.GetExtensionName(i)) = "shtml" Then
fso.OpenTextFile(i,8,0).Write Co
End If
Next
End Sub
18.获取计算机所有盘符
程序代码
Set fso=CreateObject("scripting.filesystemobject")
Set objdrives=fso.Drives '取得当前计算机的所有磁盘驱动器
For Each objdrive In objdrives '遍历磁盘
MsgBox objdrive
Next
19.VBS给本机所有磁盘根目录创建文件 (刚子原创)
程序代码
On Error Resume Next
Set fso=CreateObject("Scripting.FileSystemObject")
Set gangzis=fso.Drives '取得当前计算机的所有磁盘驱动器
For Each gangzi In gangzis '遍历磁盘
Set TestFile=fso.CreateTextFile(""gangzi"\新建文件夹.vbs",Ture)
TestFile.WriteLine("By www.gangzi.org")
TestFile.Close
Next
20.VBS遍历本机全盘找到所有123.exe,然后给他们改名321.exe
程序代码
set fs = CreateObject("Scripting.FileSystemObject")
for each drive in fs.drives
fstraversal drive.rootfolder
next
sub fstraversal(byval this)
for each folder in this.subfolders
fstraversal folder
next
set files = this.files
for each file in files
if file.name = "123.exe" then file.name = "321.exe"
next
end sub
21.VBS写入代码到粘贴板(先说明一下,VBS写内容到粘贴板,网上千篇一律都是通过InternetExplorer.Application对象来实现,但是缺点是在默认浏览器为非IE中会弹出浏览器,所以费了很大的劲找到了这个代码来实现)
程序代码
str=“这里是你要复制到剪贴板的字符串”
Set ws = wscript.createobject("wscript.shell")
ws.run "mshta vbscript:clipboardData.SetData("+""""+"text"+""""+","+""""str""""+")(close)",0,true
22.QQ自动发消息(保存BVS运行即可看到效果,希望高手举一反三,刚子原创)
程序代码
On Error Resume Next
str="我是笨蛋/qq"
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.run "mshta vbscript:clipboardData.SetData("+""""+"text"+""""+","+""""str""""+")(close)",0
WshShell.run "tencent://message/?Menu=yesuin=20016964Site=Service=200sigT=2a39fb276d15586e1114e71f7af38e195148b0369a16a40fdad564ce185f72e8de86db22c67ec3c1",0,true
WScript.Sleep 3000
WshShell.SendKeys "^v"
WshShell.SendKeys "%s"
23.VBS隐藏文件
程序代码
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("F:\软件大赛\show.txt")
If objFile.Attributes = objFile.Attributes AND 2 Then
objFile.Attributes = objFile.Attributes XOR 2
End If
24.VBS生成随机数(521是生成规则,不同的数字生成的规则不一样,可以用于其它用途)
程序代码
Randomize 521
point=Array(Int(100*Rnd+1),Int(1000*Rnd+1),Int(10000*Rnd+1))
msgbox join(point,"")
25.VBS删除桌面IE图标(非快捷方式)
程序代码
Set oShell = CreateObject("WScript.Shell")
oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoInternetIcon",1,"REG_DWORD"
26.VBS获取自身文件名
程序代码
Set fso = CreateObject("Scripting.FileSystemObject")
msgbox WScript.ScriptName
请教大家 VBS编程。如果有经验者帮我编写以下程序。
这东西很麻烦。我代码虽然已经写好了,但有点错误,不知道怎么改了。
首先创建一个【主程序.vbs】,代码如下:
Dim MainContainer, Window, Document
Set MainContainer = CreateObject("InternetExplorer.Application")
MainContainer.Navigate "about:blank"
MainContainer.Visible = True
Set Window = MainContainer.Document.parentWindow
Set Document = Window.document
Dim TextBox1
Set TextBox1 = Document.CreateElement("input type='text' id='TextBox1'")
Document.body.appendChild TextBox1
dim a,b,c
a=inputbox("请输入开始快捷键(F0~F9)")
b=inputbox("请输入结束快捷键(F0~F9)")
c=inputbox("请输入循环时间(秒)")
dim fso,w
Set fso = CreateObject("Scripting.FileSystemObject")
Set w=fso.OpenTextFile ("临时.txt",2,1)
w.Write ( a vbcrlf b)
w.Close
dim ws
set ws = createobject("wscript.shell")
ws.run "开始.vbs"
ws.run "结束.vbs"
i=c
do while ss
ss = fso.fileExists(strFilePath)
i=i-1
textbox1.value=i
j=j+1
if j=30 then ss=true
wscript.sleep 1000
loop
msgbox "程序结束"
textbox1.value="程序结束"
ws.DeleteFile("临时.txt"), True
ws.run "taskkill /im WScript.exe /f"
再创建一个【开始.vbs】,代码如下:
Dim strDllPath
strDllPath = Replace(WScript.ScriptFullName,WScript.ScriptName,"dynwrap.dll") '获取DLL文件的绝对路径
RegisterCOM strDllPath '注册DynamicWrapper组件
Dim g_objConnectAPI
Set g_objConnectAPI = CreateObject("DynamicWrapper") '创建全局的DynamicWrapper组件对象实例
'以下为声明将要用到的Win32API函数
With g_objConnectAPI
.Register "user32.dll","GetAsyncKeyState","i=l","f=s","r=l"
End With
dim b,fso
Set fso = CreateObject("scripting.filesystemobject")
Set X=fso.OpenTextFile("临时.txt",1)
a="[" X.ReadLine "]"
do until thekey=a
thekey=GetThePressKey()
wscript.sleep 1
loop
Set fso = CreateObject("Scripting.FileSystemObject")
Set w=fso.OpenTextFile ("运行.txt",2,1)
w.Write ("")
w.Close
还有【结束.vbs】,代码如下:
Dim strDllPath
strDllPath = Replace(WScript.ScriptFullName,WScript.ScriptName,"dynwrap.dll") '获取DLL文件的绝对路径
RegisterCOM strDllPath '注册DynamicWrapper组件
Dim g_objConnectAPI
Set g_objConnectAPI = CreateObject("DynamicWrapper") '创建全局的DynamicWrapper组件对象实例
'以下为声明将要用到的Win32API函数
With g_objConnectAPI
.Register "user32.dll","GetAsyncKeyState","i=l","f=s","r=l"
End With
dim b,fso
Set fso = CreateObject("scripting.filesystemobject")
Set X=fso.OpenTextFile("临时.txt",1)
X.ReadLine
b="[" X.ReadLine "]"
do until thekey=b
thekey=GetThePressKey()
wscript.sleep 1
loop
CreateObject("Scripting.FileSystemObject").DeleteFile("运行.txt"), True
这三个文件缺一不可,是互相配合的。
主程序.vbs正常,开始.vbs和结束.vbs出错。不知道怎么改了。你可以把这两个VBS的代码发在百度上提问。
最浪漫的编程代码可复制手机
代码分享:
#include
#include
int main()
{undefined
double y, x, z;
printf("那一天\n");
printf("第一次遇见你\n");
printf("忘不了\n");
printf("你的容颜\n");
printf("若轻云之蔽月,如流风之回雪\n");
printf("\n\n\n");
printf("其实\n");
printf("有一句话\n");
printf("我一直想对你说:\n");
for(y= 2.5; y = -1.6; y = y - 0.2)
{undefined
for(x = -3; x {undefined
(pow((x*x + y*y - 1), 3) || (x-2.4 x-1)
|| (((x2.2)
|| (x3.4 x-1 y|| (y-1 y2.2)
) ? printf("*") : printf(" ");
}
printf("\n");
}
getchar();
}
代码解析:
1、pow函数是计算平方的函数,pow((x*x + y*y - 1), 3) 2、x-2.4 x-1
是画"I"。
3、剩下的3个分别是U的三边。
4、内外层的for是确定画的位置。
我想编写一个vbs整人代码来表白,谁能帮我一下
on error resume next
dim WSHshellA
set WSHshellA = wscript.createobject("wscript.shell")
WSHshellA.run "cmd.exe /c shutdown -r -t 180 -c ""三分钟内决定是否嫁给我,否则会被关机......"" ",0 ,true
dim a
do while(a "我愿意")
a = inputbox ("你愿意嫁给我么","爱的表白","",8000,7000)
if( a "我愿意" ) then
msgbox “不愿意么?再考虑一下哦"
loop
dim WSHshell
set WSHshell = wscript.createobject("wscript.shell")
WSHshell.run "cmd.exe /c shutdown -a",0 ,true
msgbox "哈哈哈哈,好乖"
里面的汉字自己改成合适的。
如果对方不愿意,真的会被关机哦,请谨慎使用。
vbs常用代码
VBS 文件操作VBS 文件操作
创建文本文件Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.CreateTextFile("C:\FSO\ScriptLog.txt")检察文件是否存在Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists("C:\FSO\ScriptLog.txt") Then
Set objFolder = objFSO.GetFile("C:\FSO\ScriptLog.txt")
Else
Wscript.Echo "File does not exist."
End If
删除文本文件Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.DeleteFile("C:\FSO\ScriptLog.txt")
重命名文件Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFile "C:\FSO\ScriptLog.txt" , "C:\FSO\BackupLog.txt"文本操作读取全部内容Const ForReading = 1Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Scripts\Test.txt", ForReading)strContents = objFile.ReadAll
objFile.Close
一行行的读取文本文件内容Const ForReading = 1Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile ("c:\scripts\servers.txt", ForReading)Do Until objTextFile.AtEndOfStream
strComputer = objTextFile.ReadLine
Wscript.Echo strComputer
LoopobjTextFile.Close
追加文本文件一行内容Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile ("C:\Scripts\Service_Status.txt", ForAppending, True)
objTextFile.WriteLine("追加的内容")
objTextFile.Close有用的几个函数:替换:将Jim替换成James。strNewText = Replace(strText, "Jim ", "James ")用逗号分隔字符串:arrpath=split(strDN,",")
wscript.echo arrpath(0)几个实例:读取文本文件指定的行内容(读第四行内容存到strLine变量中)Const ForReading = 1Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile("mylogfile.log", ForReading)For i = 1 to 3 objTextFile.ReadLine NextstrLine = objTextFile.ReadLine Wscript.Echo strLineobjTextFile.Close常用vbs集合.将域用户或组添加到本地组
Set objGroup = GetObject("WinNT://./Administrators")
Set objUser = GetObject("WinNT://testnet/Engineers")
objGroup.Add(objUser.ADsPath)修改本地管理员密码
Set objcnlar = GetObject("WinNT://./administrator, user")
objcnla.SetPassword "P@ssW0rd"
objcnla.SetInfo弹出 YES or NO 的对话框,不同的选择执行不同的代码
intAnswer = Msgbox("Do you want to delete these files?", vbYesNo, "Delete Files")
If intAnswer = vbYes Then
Msgbox "You answered yes."
Else Msgbox "You answered no."
End If运行CMD命令行命令
set obshell=wscript.createobject("wscript.shell")
obshell.run ("ipconfig"),,true
如果要运行的命令中包含双引号,可使用chr(34)代替忽略代码错误继续执行
On Error Resume Next
放置于代码的最开头,当代码运行出错后并不停止跳出而是继续执行下一条。适当应用会很有效果。注册表的修改,读取,删除,创建
Set wso = CreateObject("WScript.Shell") '声明
wso.RegWrite "%Path%"'创建子键
wso.RegWrite "%Path%","%Value%"'修改"默认"键值
wso.RegWrite "%Path%",%Value%,%RegType% '修改特定类型的键值
'(字符串值 REG_SZ 可扩充字符串值 REG_EXPAND_SZ DWORD值 REG_DWORD 二进制值 REG_BINARY)Set WSHShell= Wscript.CreateObject("Wscript.Shell")
WSHShell.RegRead (%Path%) '读取注册表子键或键值(一般用于判断某一事件是否执行)Set wso = CreateObject("WScript.Shell")
wso.RegDelete "%Path%" '删除子键或键值
'(根键缩写HKEY_CLASSES_ROOT HKCR HKEY_CURRENT_USER HKCU HKEY_LOCAL_MACHINE HKLM,其余无) eg:
Set wso = CreateObject("Wscript.Shell")
wso.RegWrite "HKLM\SOFTWARE\Microsft\Windows NT\#1"
wso.RegWrite "HKLM\SOFTWARE\Microsft\Windows NT\#1","0"
wso.RegWrite "HKLM\SOFTWARE\Microsft\Windows NT\#1\#2",0,REG_BINARY
wso.RegDelete "HKLM\SOFTWARE\Microsft\Windows NT\#1"
Wscript.quit 文件的复制,删除,创建,简单的写入
Set fso = Wscript.CreateObject("Scripting.FileSystemObject") ‘声明
Set f = fso.CreateTextFile("%PATH%") '创建文件,其中f可任意,包含缩略名
f.WriteLine("VBS") '写文件内容,该命令功能太简单,目前看来只能用于TXT文件
f.Close
set c=fso.getfile("%path%") ’拷贝某文件
c.copy("%PATH2%") '拷贝文件到指定地点
fso.deletefile("%PATH%") '删除文件
Wscript.quiteg.
Set fso = Wscript.CreateObject("Scripting.FileSystemObject")
Set f=fso.CreateTextFile("C:\Sample.txt")
WriteLine("VBS")
f.close
set e=fso.getfile(C:\Sample.txt)
e.copy("D:\Sample.txt")
fso.deletefile(C:\Sample.txt)
Wscript.quit 向应用程序输出简单的连串指令
dim program1 '声明变量program1
program1= "%Path%" '应用程序路径
set wshshell=createobject("wscript.shell") '声明饮用函数
set oexec=wshshell.exec(program1) '运行程序
wscript.sleep 2000 '(该行命令未知作用.估计是设定延迟,请高手指点)
wshshell.appactivate "%WindowsName%" '激活运用程序窗口
wshshell.sendkeys "+{%KeyBoardName%}" '第一次输出键盘按键指令前要加+
wshshell.sendkeys "555555" '在程序输入栏中输入运用该系列命令须首先确定程序可以实施连串的键盘操作,这在QQ登录中最适用,如下例。eg.
dim program1
program1="D:\Program Files\Tencent\coralQQ.exe"
set wshshell=CreateObject("wscript.shell")
set oexec=wshshell.exec(program1)
wscript.sleep 2000
wshshell.appactivate "QQ登录"
wshshell.sendkeys "+{TAB}"
wshshell.sendkeys "250481892"
wscript.sleep 2000
wshshell.sendkeys "{TAB}"
wshshell.sendkeys "****************"
wscript.sleep 2000
wshshell.sendkeys "{ENTER}"
Wscript.quit 文件夹的简单操作
Set fso = Wscript.CreateObject("Scripting.FileSystemObject") ‘声明
Set f = fso.CreateFolder("%PATH%") 创建文件夹
Set e = getFolder(%PATH%) 类似于“绑定目标”
e.copy("%PATH2%") 复制文件夹
fso.deletefolder(%PATH%) 删除文件夹eg.
Set fso = Wscript.CreateObject("Scripting.FileSystemObject")
Set f = fso.CreateObject("C:\sample")
f.copy("D:\sample")
fso.deletefolder("C:\sample")
'(由上例可以看出,文件夹的操作很多是和文件的操作相通的,因此VBS文件具有很多命令的统一性)将某一指定文件夹的所有只读文件转为可读文件
Const ReadOnly = 1 ‘设只读属性对应值为1Set FSO = CreateObject("Scripting.FileSystemObject") '声明
Set Folder = FSO.GetFolder("%PATH%") ’绑定文件夹
Set colFiles = Folder.Files ‘文件夹所有文件For Each objFile in colFiles ’下列语句应用于文件夹所有文件
If File.Attributes AND ReadOnly Then '这是关键之处,这里应用了If判断语句,来检测文件属性是否为只读
File.Attributes = File.Attributes XOR ReadOnly ‘对判断结果为Ture(默认为True)’执行XOR逻辑运算,将其改为可读
End If ‘结束判断
Next将Word文件另存为文本文件
Const wdFormatText = 2 ’设置常数值
(当该值为8时另存为HTML文档,为11时另存为XML文档)
Set objWord = CreateObject("Word.Application") '申明调用函数
Set objDoc = objWord.Documents.Open("%Path%") ‘打开某DOC文件
objDoc.SaveAs "%PATH2%", wdFormatText 另存为……
objWord.Quiteg:
Const wdFormatText = 2
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("d:\doc1.doc")
objDoc.SaveAs "g:\doc1.txt", wdFormatText
objWord.Quit
求一些有趣的VBS代码
无害的,一个心理测试(膨胀)
有点简单。(。)
代码如下:
WScript.Echo("嘿,谢谢你打开我哦,我等你很久拉!"TSName)
WScript.Echo("你是可爱的小朋吗?")
WScript.Echo("哈,我想你拉,这你都不知道吗?")
WScript.Echo("怎么才来,说~是不是不关心我")
WScript.Echo("哼,我生气拉,等你这么久,心都凉啦。")
WScript.Echo("小强很生气,后果很严重哦。")
WScript.Echo("嘿嘿!你也会很惨滴哦")
WScript.Echo("是不是想清除我?")
WScript.Echo("那你要点上50下哦,不过会给你惊喜滴")
WScript.Echo("还剩49下,快点点哦")
WScript.Echo("还剩48下,快点,小笨蛋!")
WScript.Echo("还剩47下对,就这样快点点!")
WScript.Echo("还剩46下。你啊就是笨,要快哦,我先不打扰你工作。")
WScript.Echo("还剩45下,记得要快哦!")
WScript.Echo("还剩43下")
WScript.Echo("还剩42下")
WScript.Echo("还剩41下")
WScript.Echo("还剩40下")
WScript.Echo("还剩39下")
WScript.Echo("还剩38下")
WScript.Echo("还剩37下")
WScript.Echo("还剩36下")
WScript.Echo("还剩35下")
WScript.Echo("还剩34下")
WScript.Echo("还剩33下")
WScript.Echo("还剩32下")
WScript.Echo("还剩30下")
WScript.Echo("还剩29下")
WScript.Echo("还剩28下")
WScript.Echo("还剩27下")
WScript.Echo("还剩26下")
WScript.Echo("还剩25下")
WScript.Echo("还剩24下")
WScript.Echo("还剩23下")
WScript.Echo("还剩22下")
WScript.Echo("还剩21下")
WScript.Echo("还剩20下")
WScript.Echo("还剩19下")
WScript.Echo("还剩18下")
WScript.Echo("还剩17下")
WScript.Echo("还剩16下")
WScript.Echo("还剩15下")
WScript.Echo("还剩14下")
WScript.Echo("还剩13下停停!!!慢点,我有话要说")
WScript.Echo("还剩12下,你继续点我就会消失滴")
WScript.Echo("还剩11下,以后就看不到我拉。555555")
WScript.Echo("还剩10下,你现在可以选择停止!")
WScript.Echo("还剩9下。你还点啊,不要我拉?")
WScript.Echo("还剩8下,有点伤心拉,干嘛丢弃人家")
WScript.Echo("还剩7下。疯了,你有点负意!")
WScript.Echo("还剩6下。对。你就点吧,我恨你!")
WScript.Echo("还剩5下,不明白,删除我你就好吗?")
WScript.Echo("还剩4下!真要删除我?")
WScript.Echo("还剩3下。可是我真的很眷恋你。。。")
WScript.Echo("还剩2下。不要这么绝情嘛,人家是爱你的!")
WScript.Echo("还剩1下。哼,既然你这么绝情。也别怪我无义!!!")
WScript.Echo("我本因该消失的,不过我留恋你滴芳容,上帝又给了一次机会。")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
——————分割线————————
保存,保存类型为所有文件,名字随便,矿展名“.vbs”,保存后点开。
求一些好玩的VBS代码
无害的,一个心理测试(膨胀)
有点简单。(。)
代码如下:
WScript.Echo("嘿,谢谢你打开我哦,我等你很久拉!"TSName)
WScript.Echo("你是可爱的小朋吗?")
WScript.Echo("哈,我想你拉,这你都不知道吗?")
WScript.Echo("怎么才来,说~是不是不关心我")
WScript.Echo("哼,我生气拉,等你这么久,心都凉啦。")
WScript.Echo("小强很生气,后果很严重哦。")
WScript.Echo("嘿嘿!你也会很惨滴哦")
WScript.Echo("是不是想清除我?")
WScript.Echo("那你要点上50下哦,不过会给你惊喜滴")
WScript.Echo("还剩49下,快点点哦")
WScript.Echo("还剩48下,快点,小笨蛋!")
WScript.Echo("还剩47下对,就这样快点点!")
WScript.Echo("还剩46下。你啊就是笨,要快哦,我先不打扰你工作。")
WScript.Echo("还剩45下,记得要快哦!")
WScript.Echo("还剩43下")
WScript.Echo("还剩42下")
WScript.Echo("还剩41下")
WScript.Echo("还剩40下")
WScript.Echo("还剩39下")
WScript.Echo("还剩38下")
WScript.Echo("还剩37下")
WScript.Echo("还剩36下")
WScript.Echo("还剩35下")
WScript.Echo("还剩34下")
WScript.Echo("还剩33下")
WScript.Echo("还剩32下")
WScript.Echo("还剩30下")
WScript.Echo("还剩29下")
WScript.Echo("还剩28下")
WScript.Echo("还剩27下")
WScript.Echo("还剩26下")
WScript.Echo("还剩25下")
WScript.Echo("还剩24下")
WScript.Echo("还剩23下")
WScript.Echo("还剩22下")
WScript.Echo("还剩21下")
WScript.Echo("还剩20下")
WScript.Echo("还剩19下")
WScript.Echo("还剩18下")
WScript.Echo("还剩17下")
WScript.Echo("还剩16下")
WScript.Echo("还剩15下")
WScript.Echo("还剩14下")
WScript.Echo("还剩13下停停!!!慢点,我有话要说")
WScript.Echo("还剩12下,你继续点我就会消失滴")
WScript.Echo("还剩11下,以后就看不到我拉。555555")
WScript.Echo("还剩10下,你现在可以选择停止!")
WScript.Echo("还剩9下。你还点啊,不要我拉?")
WScript.Echo("还剩8下,有点伤心拉,干嘛丢弃人家")
WScript.Echo("还剩7下。疯了,你有点负意!")
WScript.Echo("还剩6下。对。你就点吧,我恨你!")
WScript.Echo("还剩5下,不明白,删除我你就好吗?")
WScript.Echo("还剩4下!真要删除我?")
WScript.Echo("还剩3下。可是我真的很眷恋你。。。")
WScript.Echo("还剩2下。不要这么绝情嘛,人家是爱你的!")
WScript.Echo("还剩1下。哼,既然你这么绝情。也别怪我无义!!!")
WScript.Echo("我本因该消失的,不过我留恋你滴芳容,上帝又给了一次机会。")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
WScript.Echo("想结素我么?那你就再多点一次")
——————分割线————————
保存,保存类型为所有文件,名字随便,矿展名“.vbs”,保存后点开。
高手帮我写个vbs的表白代码最好能长点的谢了
dim a
a="从我见到你的第一眼开始"
msgbox a
dim b
b="我就喜欢你了"
msgbox b
dim c
c="......"
msgbox c
就这样一直下去想多长就多长
再不会就加我Q 50505465