dim AsoR,FlashFileName
Set ArgObj =
dim PositionStart,OKed,Tag,EndSize
PositionStart = 920000'flash 4's approximate bytes
EndSize = 8 'The number of bytes at the end of the exe file, other versions can be set to 0
FlashFileName = ArgObj(0)'Passage path
set AsoR=CreateObject("")
=3
=1
set AsoW=CreateObject("")
=3
=1
(FlashFileName)
OKed = true
dim filesize
filesize =
if filesize>PositionStart then
while OKed
= PositionStart
Tag = Bin2Str((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 "File Error"
end if
PositionStart = PositionStart + 16
'msgbox PositionStart
= PositionStart
(filesize-int(PositionStart)-int(EndSize))
'New file name
dim newFileName
'newFileName = left(FlashFileName,len(FlashFileName)-4) & ".swf"
newFileName = FlashFileName & ".swf"
Set fso = CreateObject("")
If ((newFileName)) Then
overwrite = msgbox(newFileName&" already exists"& vbnewline &"Do you want to replace it?",308,"File already exists- exe2swf script")
if overwrite=6 then
newFileName, 2
else
msgbox "Operation was cancelled",0,"exe2swf script"
end if
else
newFileName, 1
end if
set AsoR=nothing
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