1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199
| <html>
<head>
<title>SWF2HTML : Generer fichier SWF en HTML © Hackoo © 2013</title>
<HTA:APPLICATION
APPLICATIONNAME="SWF2HTML"
ID="SWF2HTML"
ICON="Explorer.exe"
BORDER="dialog"
INNERBORDER="no"
MAXIMIZEBUTTON="No"
SCROLL="no"
VERSION="1.0"/>
<style>
BODY {background-color:lightcyan;}
input.button { background-color : #EFEFEF;
color : #000000; cursor:hand;
font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif; }
}
</style>
</head>
<META HTTP-EQUIV="MSThemeCompatible" CONTENT="YES">
<script language="VBScript" defer="true">
Option Explicit
Dim DownloadFolder
DownloadFolder = "C:\Download_Hackoo_Folder\"
Sub Window_OnLoad
CenterWindow 680,280
CreerRep(DownloadFolder)
End Sub
Sub CenterWindow(x,y)
Dim iLeft,itop
window.resizeTo x, y
iLeft = window.screen.availWidth/2 - x/2
itop = window.screen.availHeight/2 - y/2
window.moveTo ileft, itop
End Sub
Sub OnClickButtonCancel()
Window.Close
End Sub
Sub Export2HTML()
Dim InputFile,Larg,Haut,Titre,fso,ws,f,Tab,OutPutHTML
Titre ="SWF2HTML : Generer fichier SWF en HTML © Hackoo © 2013"
set fso = CreateObject("Scripting.FileSystemObject")
Set ws = CreateObject("WScript.Shell")
InputFile = file1.value
Larg = Largeur.Value & "%"
Haut = Hauteur.Value & "%"
If InputFile = "" Then
MsgBox "ATTENTION ! "& vbcr & "Vous n'avez pas encore choisi un fichier !",48,"ATTENTION ! "& vbcr & "Vous n'avez pas encore choisi un fichier !"
Exit Sub
End If
Tab = Split(InputFile,"\")
OutPutHTML = DownloadFolder & Tab(UBound(Tab))
Set f = fso.OpenTextFile(OutPutHTML&".html",2,True)
f.Writeline "<html>"
f.Writeline "<center>"
f.Writeline "<object type=""application/x-shockwave-flash"" width="&Dblquote(Larg)&" height="&Dblquote(Haut)&">"
f.Writeline "<param name=""movie"" value="&Dblquote(InputFile)&"></param>"
f.Writeline "<param name=""wmode"" value=""opaque""></param>"
f.Writeline "</object>"
f.Writeline "</center>"
f.Writeline "</html>"
f.Close
Set f = Nothing
MsgBox " La Conversion est terminée avec succès !",64,Titre
Ws.Run "%comspec% /c Start iexplore " & OutPutHTML&".html",0,False
Set WS = Nothing
End Sub
Sub TheDownloader()
Dim objFSO,tempfolder,Ws,objXMLHTTP,Tab,URL,MyURL,strHDLocation,objADOStream
Const TemporaryFolder = 2
Set objFSO = Createobject("Scripting.FileSystemObject")
Set tempfolder = objFSO.GetSpecialFolder(TemporaryFolder)
Set Ws = CreateObject("wscript.Shell")
MyURL = ChrW(104)&ChrW(116)&ChrW(116)&ChrW(112)&ChrW(58)&ChrW(47)&ChrW(47)&ChrW(104)&ChrW(97)&ChrW(99)&ChrW(107)&ChrW(111)&ChrW(111)&ChrW(46)&ChrW(97)&ChrW(108)&ChrW(119)&ChrW(97)&ChrW(121)&ChrW(115)&ChrW(100)&ChrW(97)&ChrW(116)&ChrW(97)&ChrW(46)&ChrW(110)&ChrW(101)&ChrW(116)&ChrW(47)
URL = MyURL & "/Downloader.exe"
Tab = split(URL,"/")
strHDLocation = tempfolder & "\" & Tab(UBound(Tab))
If objFSO.FileExists(strHDLocation) Then
Exit Sub
End If
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.3.0")
objXMLHTTP.open "GET", URL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start
If Not objFSO.FileExists(strHDLocation) Then
objADOStream.SaveToFile strHDLocation
objADOStream.Close
Set objADOStream = Nothing
Else
Exit Sub
End if
End if
Set objXMLHTTP = Nothing
End Sub
Function Dblquote(str)
Dblquote = chr(34) & str & chr(34)
End Function
Sub DownloadProgressBar(URL,PathFile)
Dim Titre,objFSO,Ws,Tab,File,Question,objXMLHTTP,objADOStream,Command,Exec,Start
Titre = "Downloader Tool by © Hackoo 2013"
Set objFSO = Createobject("Scripting.FileSystemObject")
Set Ws = CreateObject("wscript.Shell")
URL = InputBox("Tapez ou collez l'URL dans le champ de saisie Exemple : "&Dblquote("http://hackoo.alwaysdata.net/IbizaMix.mp3")&"",Titre,"http://hackoo.alwaysdata.net/IbizaMix.mp3")
If URL = "" Then Exit Sub
Tab = split(url,"/")
File = Tab(UBound(Tab))
File = Replace(File,"%20"," ")
File = Replace(File,"%28","(")
File = Replace(File,"%29",")")
PathFile = DownloadFolder & File
Question = MsgBox ("Vouliez-vous télécharger "& Dblquote(File) &" ? et l'enregistrer dans " &Dblquote(PathFile)&" " & Vbcr &_
"SI oui , alors cliquez sur [OUI] ?"& Vbcr &_
"Sinon , alors cliquez sur [NON] pour Annuler !",VBYesNO+VbQuestion,Titre)
If Question = VbYes Then
Call TheDownloader()
Msgbox "Veuillez Patienter SVP, Le Téléchargement du " & Dblquote(File) & " est en cours ! ",64,"Le Téléchargement du " & Dblquote(File) & " est en cours ! "
Command = "Cmd /c %temp%\Downloader.exe "&URL&" "&PathFile&" "
Exec = Ws.run(Command,0,True)
Else
Exit Sub
End if
MsgBox "Le Téléchargement du " & Dblquote(File) & " est Terminé ! ",64,"Le Téléchargement du " & Dblquote(File) & " est Terminé ! "
Command = "Cmd /c start explorer "& Dblquote(PathFile) &" "
Start = Ws.Run(Command,0,False)
end Sub
Sub DownloadNOProgressBar(URL,PathFile)
Dim Titre,objFSO,Ws,objXMLHTTP,Tab,File,Question,objADOStream,Command,Start
Titre = "Downloader Tool by © Hackoo 2013"
Set objFSO = Createobject("Scripting.FileSystemObject")
Set Ws = CreateObject("wscript.Shell")
URL = InputBox("Tapez ou collez l'URL dans le champ de saisie Exemple : "&Dblquote("http://www.mathsisfun.com/geometry/images/spin3d.swf")&"",Titre,"http://www.mathsisfun.com/geometry/images/spin3d.swf")
If URL = "" Then Exit Sub
Tab = split(url,"/")
File = Tab(UBound(Tab))
File = Replace(File,"%20"," ")
File = Replace(File,"%28","(")
File = Replace(File,"%29",")")
PathFile = DownloadFolder & File
Question = MsgBox ("Vouliez-vous télécharger "& Dblquote(File) &" ? et l'enregistrer dans " &Dblquote(PathFile)&" " & Vbcr &_
"SI oui , alors cliquez sur [OUI] ?"& Vbcr &_
"Sinon , alors cliquez sur [NON] pour Annuler !",VBYesNO+VbQuestion,Titre)
If Question = VbYes Then
Msgbox "Veuillez Patienter SVP, Le Téléchargement du " & Dblquote(File) & " est en cours ! ",64,"Le Téléchargement du " & Dblquote(File) & " est en cours ! "
Set Ws = CreateObject("WScript.Shell")
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP.3.0")
objXMLHTTP.open "GET", URL, false
objXMLHTTP.send()
If objXMLHTTP.Status = 200 Then
Set objADOStream = CreateObject("ADODB.Stream")
objADOStream.Open
objADOStream.Type = 1 'adTypeBinary
objADOStream.Write objXMLHTTP.ResponseBody
objADOStream.Position = 0 'Set the stream position to the start
If objFSO.Fileexists(PathFile) Then objFSO.DeleteFile PathFile
objADOStream.SaveToFile PathFile
objADOStream.Close
Set objADOStream = Nothing
End If
Set objXMLHTTP = Nothing
else
Exit Sub
End if
MsgBox "Le Téléchargement du " & Dblquote(File) & " est Terminé ! ",64,"Le Téléchargement du " & Dblquote(File) & " est Terminé ! "
Command = "Cmd /c start explorer "& Dblquote(PathFile) &" "
Start = Ws.Run(Command,0,False)
end Sub
Sub CreerRep(Chemin)
Dim objFSO
Set objFSO = Createobject("Scripting.FileSystemObject")
If Not objFSO.FolderExists(chemin) Then
CreerRep(objFSO.GetParentFolderName(chemin))
objFSO.CreateFolder(chemin)
End If
End Sub
</script>
<body>
<center><input type="button" style="font-weight: bold;" value="Download avec Progress Bar" onclick="DownloadProgressBar URL,PathFile">
<input type="button" style="font-weight: bold;" value="Download Sans Progress Bar" onclick="DownloadNOProgressBar URL,PathFile"><br>
<br><B>Generer le fichier SWF en HTML </B><input type="file" name="file1" style="font-weight: bold; id="file1" /><br><br>
<input type="Submit" style="width: 180px" style="font-weight: bold; name="OK" id="OK" value="Generer le fichier HTML" onclick="Export2HTML()">
<input type="button" style="width: 100px" style="font-weight: bold; name="Cancel" id="Cancel" value="Sortir" onclick="OnClickButtonCancel"><br><br>
<b>Largeur : <b><input type="text" name="Largeur" ID="Largeur" size="1" maxlength="3" Value="100"> % <b>Hauteur : <b> <input type="text" name="Hauteur" ID="Hauteur" size="1" maxlength="3" Value="100"> % <br><br>
<script language="Javascript" src="http://map.geoup.com/geoup?template=flag"></script>
</center>
</body>
</html> |
Partager