复制代码 代码如下:
dim AsoR,FlashFileName
Set ArgObj = WScript.Arguments
dim PositionStart,OKed,Tag,EndSize
PositionStart = 920000'flash 4的播放器的大致字节数
EndSize = 8 'exe文件结尾字节数,其它版本可以设置为0
FlashFileName = ArgObj(0)'传递路径
set AsoR=CreateObject("Adodb.Stream")
AsoR.Mode=3
AsoR.Type=1
AsoR.Open
set AsoW=CreateObject("Adodb.Stream")
AsoW.Mode=3
AsoW.Type=1
AsoW.Open
AsoR.LoadFromFile(FlashFileName)
OKed = true
dim filesize
filesize = AsoR.size
if filesize>PositionStart then
while OKed
AsoR.Position = PositionStart
Tag = Bin2Str(AsoR.read(20))
if instr(Tag,"0000000") >0 then
PositionStart = PositionStart + 1
else
PositionStart = PositionStart + 20
end if
if Tag = "00000000000000000708783" or Tag = "00000000000000000678783" then
OKed = false
end if
'if PositionStart > filesize then
' OKed = false
'end if
wend
else
msgbox "文件错误"
end if
PositionStart = PositionStart + 16
'msgbox PositionStart
AsoR.Position = PositionStart
AsoW.write AsoR.read(filesize-int(PositionStart)-int(EndSize))
'新文件名
dim newFileName
'newFileName = left(FlashFileName,len(FlashFileName)-4) & ".swf"
newFileName = FlashFileName & ".swf"
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(newFileName)) Then
overwrite = msgbox(newFileName&" 已存在"& vbnewline &"要替换它吗?",308,"文件已经存在 - exe2swf脚本")
if overwrite=6 then
AsoW.SaveToFile newFileName, 2
else
msgbox "操作被取消",0,"exe2swf脚本"
end if
else
AsoW.SaveToFile newFileName, 1
end if
AsoR.close
set AsoR=nothing
AsoW.close
set AsoW=nothing
Function Bin2Str(Bin)
Dim I, Str
For I=1 to LenB(Bin)
clow=MidB(Bin,I,1)
if ASCB(clow)<128 then
Str = Str & (ASCB(clow))
else
I=I+1
if I <= LenB(Bin) then Str = Str & (ASCW(MidB(Bin,I,1)&clow))
end if
Next
Bin2Str = Str
End Function
dim AsoR,FlashFileName
Set ArgObj = WScript.Arguments
dim PositionStart,OKed,Tag,EndSize
PositionStart = 920000'flash 4的播放器的大致字节数
EndSize = 8 'exe文件结尾字节数,其它版本可以设置为0
FlashFileName = ArgObj(0)'传递路径
set AsoR=CreateObject("Adodb.Stream")
AsoR.Mode=3
AsoR.Type=1
AsoR.Open
set AsoW=CreateObject("Adodb.Stream")
AsoW.Mode=3
AsoW.Type=1
AsoW.Open
AsoR.LoadFromFile(FlashFileName)
OKed = true
dim filesize
filesize = AsoR.size
if filesize>PositionStart then
while OKed
AsoR.Position = PositionStart
Tag = Bin2Str(AsoR.read(20))
if instr(Tag,"0000000") >0 then
PositionStart = PositionStart + 1
else
PositionStart = PositionStart + 20
end if
if Tag = "00000000000000000708783" or Tag = "00000000000000000678783" then
OKed = false
end if
'if PositionStart > filesize then
' OKed = false
'end if
wend
else
msgbox "文件错误"
end if
PositionStart = PositionStart + 16
'msgbox PositionStart
AsoR.Position = PositionStart
AsoW.write AsoR.read(filesize-int(PositionStart)-int(EndSize))
'新文件名
dim newFileName
'newFileName = left(FlashFileName,len(FlashFileName)-4) & ".swf"
newFileName = FlashFileName & ".swf"
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FileExists(newFileName)) Then
overwrite = msgbox(newFileName&" 已存在"& vbnewline &"要替换它吗?",308,"文件已经存在 - exe2swf脚本")
if overwrite=6 then
AsoW.SaveToFile newFileName, 2
else
msgbox "操作被取消",0,"exe2swf脚本"
end if
else
AsoW.SaveToFile newFileName, 1
end if
AsoR.close
set AsoR=nothing
AsoW.close
set AsoW=nothing
Function Bin2Str(Bin)
Dim I, Str
For I=1 to LenB(Bin)
clow=MidB(Bin,I,1)
if ASCB(clow)<128 then
Str = Str & (ASCB(clow))
else
I=I+1
if I <= LenB(Bin) then Str = Str & (ASCW(MidB(Bin,I,1)&clow))
end if
Next
Bin2Str = Str
End Function
标签:
vbs,exe2swf
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
内蒙古资源网 Copyright www.nmgbbs.com
暂无“用vbs实现的exe2swf工具脚本代码”评论...
RTX 5090要首发 性能要翻倍!三星展示GDDR7显存
三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。
首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。
据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。