Exe2swf: Convert Flash files in EXE format to swf format. There are many tools on the Internet, which are written in VBScript.
Usage:
Set the following Code Saved as exe2swf. vbs
Drag and Drop the Flash file in EXE format on this file to generate the SWF file,
Updated on:
Copy code The Code is as follows: 'exe2swf tool,
'Usage: drag and drop an exe flash file to generate a SWF file,
'Haiwa @ http://www.51windows.Net
'Thank jimbob for providing help.
Dim asor, flashfilename
Set argobj = wscript. Arguments
Dim positionstart, oked, Tag, endsize
Positionstart = 920000 'Flash 4 Player's approximate bytes
Endsize = 8'exe file end Byte Count, other versions can be set to 0
Flashfilename = argobj (0) 'Transfer Path
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 "file error"
End if
Positionstart = positionstart + 16
'Msgbox positionstart
Asor. Position = positionstart
Asow. Write asor. Read (filesize-int (positionstart)-int (endsize ))
'New file name
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 & "already exists" & vbnewline & "Do you want to replace it? ", 308," the file already exe2swf script ")
If overwrite = 6 then
Asow. savetofile newfilename, 2
Else
Msgbox "Operation canceled", 0, "exe2swf script"
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