复制代码 代码如下:
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
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
暂无评论...
更新日志
2024年11月22日
2024年11月22日
- 证声音乐图书馆《夏至 爵士境地》[320K/MP3][70.37MB]
- 孙露《同名专辑》限量1:1母盘直刻[低速原抓WAV+CUE]
- 【宝丽金唱片】群星《鼓舞飞扬》WAV+CUE
- 莫扎特弗雷德沃夏克肖斯塔科维奇《钢琴五重奏》(DG24-96)FLAC
- 证声音乐图书馆《夏至 爵士境地》[FLAC/分轨][360.16MB]
- 证声音乐图书馆《日落琴声 x 弦乐》[320K/MP3][71.2MB]
- 证声音乐图书馆《日落琴声 x 弦乐》[FLAC/分轨][342.58MB]
- 谢采妘2011《难忘的旋律(Non-StopChaCha)》马来西亚版[WAV+CUE]
- 林翠萍《听见林翠萍,记忆就会醒来》2CD[WAV+CUE]
- 木村好夫《天龍HIFI木吉他、木村好夫精选好歌》日本天龙版[WAV整轨]
- 证声音乐图书馆《日出琴声 x 民谣》[320K/MP3][53.76MB]
- 证声音乐图书馆《日出琴声 x 民谣》[FLAC/分轨][239.29MB]
- 证声音乐图书馆《绿意森林·吉他絮语》[320K/MP3][65.77MB]
- 证声音乐图书馆《绿意森林·吉他絮语》[FLAC/分轨][295.2MB]
- 证声音乐图书馆《流动与延展 彼拉提斯》[320K/MP3][56.88MB]