Jex Posted November 17, 2007 Share Posted November 17, 2007 (edited) That script downloads all fonts in www.dafonts.com or http://cooltext.com/Fonts links, extracts zip files and moves fonts to Windows/Fonts folder.Download ( $Link, $Downloadtype, $Directorytype, $Directoryname )$Link examples :http://www.dafont.com/top.php?page=1&nb_ppp=50http://www.dafont.com/top.php?page=2&nb_ppp=50http://cooltext.com/Fonts-3Dhttp://cooltext.com/Fonts-Modern$Downloadtype examples :1 = Download fonts and automatic extract zip files or copy tff files to Windows/Fonts/ folder.2 = Just download fonts. ( Not extract or copy. )$Directorytype examples :1 = Installing all fonts in "Fonts" directory.2 = Installing dafonts fonts in "Fonts" directory and cooltext fonts in "Fonts2" directory.3 = Installing fonts in your choiced directory. ( $Directoryname )Example : Download ("http://cooltext.com/Fonts-3D", 1, 2)expandcollapse popup#include <GUIConstants.au3> #include <GuiEdit.au3> #include <INet.au3> #include <String.au3> #include <_ZipPlugin.au3> PluginOpen(@ScriptDir & "\Au3Zip.dll") $Form = GUICreate("Fonts Fetcher", 305, 385, 358, 329, BitOR($WS_SYSMENU, $WS_CAPTION, $WS_POPUP, $WS_POPUPWINDOW, $WS_BORDER, $WS_CLIPSIBLINGS)) $Input1 = GUICtrlCreateInput("www.dafont.com/top.php?page=1&nb_ppp=50", 48, 16, 241, 21) $Radio1 = GUICtrlCreateRadio("Download and install fonts.", 16, 48, 145, 17) GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlSetTip(-1, "Download fonts and automatic extract zip files or copy tff files to Windows/Fonts/ folder.") $Radio2 = GUICtrlCreateRadio("Just download fonts.", 176, 48, 113, 17) GUICtrlSetTip(-1, "Just download fonts. ( Not extract or copy. )") $Input2 = GUICtrlCreateInput("Fonts", 88, 96, 201, 21) GUICtrlSetState(-1, $GUI_DISABLE) $Button = GUICtrlCreateButton("Start", 8, 128, 289, 25) GUIStartGroup() $Label1 = GUICtrlCreateLabel("Link :", 16, 24, 30, 17) $Label2 = GUICtrlCreateLabel("Folder name :", 16, 104, 68, 17) GUIStartGroup() $Radio3 = GUICtrlCreateRadio("Dir type 1", 16, 72, 65, 17) GUICtrlSetState(-1, $GUI_CHECKED) GUICtrlSetTip(-1, 'Installing all fonts in "Fonts" directory.') $Radio4 = GUICtrlCreateRadio("Dir type 2", 96, 72, 65, 17) GUICtrlSetTip(-1, 'Installing dafonts fonts in "Fonts" directory and cooltext fonts in "Fonts2" directory.') $Radio5 = GUICtrlCreateRadio("Dir type 3", 176, 72, 65, 17) GUICtrlSetTip(-1, 'Installing fonts in your choiced directory.') $Progress1 = GUICtrlCreateProgress(8, 360, 289, 17) $Edit = GUICtrlCreateEdit("", 8, 160, 289, 169) $Label3 = GUICtrlCreateLabel("", 8, 336, 289, 17) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $Button GUICtrlSetState($Button, $GUI_DISABLE) $Par3 = "" If GUICtrlRead($Radio1) = $GUI_CHECKED Then $Par1 = 1 Else $Par1 = 2 EndIf If GUICtrlRead($Radio3) = $GUI_CHECKED Then $Par2 = 1 ElseIf GUICtrlRead($Radio4) = $GUI_CHECKED Then $Par2 = 2 Else $Par2 = 3 $Par3 = GUICtrlRead($Input2) EndIf $Var = Download(GUICtrlRead($Input1), $Par1, $Par2, $Par3) Write($Var[0] & " Fonts downloaded and installed in " & $Var[1] & " seconds.") GUICtrlSetState($Button, $GUI_ENABLE) Case $Radio3 GUICtrlSetState($Input2, $GUI_DISABLE) Case $Radio4 GUICtrlSetState($Input2, $GUI_DISABLE) Case $Radio5 GUICtrlSetState($Input2, $GUI_ENABLE) EndSwitch WEnd Func Download($Url, $Method = 1, $Dirtype = 1, $Dirtype3 = "") If $Dirtype = 3 Then $Dir = "\" & $Dirtype3 & "\" GUICtrlSetData($Label3, "Download starting...") Write("Download starting from " & $Url) $Timer = TimerInit() $Source = _INetGetSource($Url) If StringInStr($Url, "dafont.com") Then $String = _StringBetween($Source, 'href="http://img.dafont.com/download/?file=', '">Download<br>') $Urltype = 1 If $Dirtype <> 3 Then $Dir = "\Fonts\" ElseIf StringInStr($Url, "cooltext.com") Then $String = _StringBetween($Source, 'Download:<a href=Download/Font/', '>Click Here</a><br />') $Urltype = 2 If $Dirtype = 1 Then $Dir = "\Fonts\" ElseIf $Dirtype = 2 Then $Dir = "\Fonts2\" EndIf EndIf If Not FileExists(@ScriptDir & $Dir) Then DirCreate(@ScriptDir & $Dir) Dim $Var[UBound($String) + 1] For $i = 0 To UBound($String) - 1 If $Urltype = 1 Then If Not FileExists(@ScriptDir & $Dir & $String[$i] & ".zip") Then $Download = 'http://img.dafont.com/download/?file=' & $String[$i] InetGet($Download, @ScriptDir & $Dir & $String[$i] & ".zip") Write(@ScriptDir & $Dir & $String[$i] & ".zip downloaded.") EndIf ElseIf $Urltype = 2 Then If Not FileExists(@ScriptDir & $Dir & $String[$i]) Then $Download = 'http://cooltext.com/Download/Font/' & $String[$i] InetGet($Download, @ScriptDir & $Dir & $String[$i]) Write(@ScriptDir & $Dir & $String[$i] & " downloaded.") EndIf EndIf $Var[$i + 1] = $String[$i] $Calculate = Round((($i + 1) / UBound($String)) * 100, 0) GUICtrlSetData($Label3, "Downloading fonts (" & $i + 1 & " / " & UBound($String) & ") " & $Calculate & "%") GUICtrlSetData($Progress1, $Calculate) Next If $Method = 1 Then For $i = 1 To UBound($String) If $Urltype = 1 Then _ZipUnZip (@ScriptDir & $Dir & $Var[$i] & ".zip", @WindowsDir & "\Fonts\") ElseIf $Urltype = 2 Then If StringInStr($Var[$i], ".zip") Then _ZipUnZip (@ScriptDir & $Dir & $Var[$i], @WindowsDir & "\Fonts\") ElseIf StringInStr($Var[$i], ".ttf") Then FileCopy(@ScriptDir & $Dir & $Var[$i], @WindowsDir & "\Fonts\" & $Var[$i]) EndIf EndIf Next EndIf $Timerdiff = TimerDiff($Timer) GUICtrlSetData($Label3, "Download completed (" & UBound($String) & " / " & UBound($String) & ") " & $Calculate & "%") Dim $Var[2] = [UBound($String), Round($Timerdiff, 0) / 1000 ] Return $Var EndFunc ;==>Download Func Write($Data) If GUICtrlRead($Edit) = "" Then GUICtrlSetData($Edit, $Data) Else GUICtrlSetData($Edit, GUICtrlRead($Edit) & @CRLF & $Data) EndIf _GUICtrlEdit_LineScroll ($Edit, 0, _GUICtrlEdit_GetLineCount ($Edit)) EndFunc ;==>WriteNeed _ZipPlugin.au3 and Au3Zip.dll for extract zip files. http://www.autoitscript.com/forum/index.ph...p;hl=_zipplugin_ZipPlugin.au3Au3Zip.dll Edited November 18, 2007 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
ashley Posted November 17, 2007 Share Posted November 17, 2007 nice idea.... But im not going to check it. Free icons for your programs Link to comment Share on other sites More sharing options...
BrettF Posted November 17, 2007 Share Posted November 17, 2007 Trying it now... Not to bad The progress is good. Easy to keep an eye on it. Overall, good job! @Ashley- If your not gonna try it, then why say anything? Sure its a nice idea, why not see how nice an idea it actually is? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Jex Posted November 17, 2007 Author Share Posted November 17, 2007 Very thanks for your comment Bert My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
BrettF Posted November 17, 2007 Share Posted November 17, 2007 You could easily add a GUI to say, I want this font and not that one... You could also poll the font folder to see if there are duplicates, as not to download the same one. There is endless possibilities with this Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Kreatorul Posted November 17, 2007 Share Posted November 17, 2007 Also you could preview it in the GUI Wow this has a lot of potential as I'm too lazy to search for fonts on the net... Link to comment Share on other sites More sharing options...
Jex Posted November 17, 2007 Author Share Posted November 17, 2007 (edited) You could also poll the font folder to see if there are duplicates, as not to download the same one.Now script check for if that font downloaded before or not.By the way im suggest that 2 links fonts for download ( Top 100 )Download("http://www.dafont.com/top.php?page=1&nb_ppp=50")Download("http://www.dafont.com/top.php?page=2&nb_ppp=50")Edit : I'm added that 2 links in script. Edited November 17, 2007 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
gamepin126 Posted November 17, 2007 Share Posted November 17, 2007 (edited) Couldn't you just do For $n = 1 to 2 Download("http://www.dafont.com/top.php?page=" & $n & "&nb_ppp=50") Next ? Very nice script by the way Edited November 17, 2007 by gamepin126 Link to comment Share on other sites More sharing options...
MadBoy Posted November 17, 2007 Share Posted November 17, 2007 Very thanks for your comment Bert Jex i am wondering will just copying the fonts into fonts directory install them in a system aswell? I've been reading somewhere you still have to go and install them from the windows explorer gui? My little company: Evotec (PL version: Evotec) Link to comment Share on other sites More sharing options...
gamepin126 Posted November 17, 2007 Share Posted November 17, 2007 Yea, you can just drag n drop them into the fonts folder to install them. Link to comment Share on other sites More sharing options...
Jex Posted November 17, 2007 Author Share Posted November 17, 2007 (edited) Jex i am wondering will just copying the fonts into fonts directory install them in a system aswell? I've been reading somewhere you still have to go and install them from the windows explorer gui?I'm dont understand what you are asking but script extracting fonts in Windows/Fonts folder. That mean not need go and install them from the windows explorer gui.@Gamepin126Not need drag n drop. Script installing fonts automaticly. Edited November 17, 2007 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
gamepin126 Posted November 17, 2007 Share Posted November 17, 2007 I know, I was just answering his question.Jex i am wondering will just copying the fonts into fonts directory install them in a system aswell? Link to comment Share on other sites More sharing options...
gseller Posted November 17, 2007 Share Posted November 17, 2007 Nice! I'm Lovin' it! JEX, you keep adding great scripts to the forum.. Thanks! Link to comment Share on other sites More sharing options...
Gif Posted November 17, 2007 Share Posted November 17, 2007 interesting, with many potentials for future use. Link to comment Share on other sites More sharing options...
Jex Posted November 17, 2007 Author Share Posted November 17, 2007 I'm added cooltext.com fonts support and some parameters. My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
BrettF Posted November 17, 2007 Share Posted November 17, 2007 I'm added cooltext.com fonts support and some parameters.I think you should add a gui. It would be awesome if you did Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Jex Posted November 18, 2007 Author Share Posted November 18, 2007 If i'm add fonts pictures in gui that will increase fonts download speed because first need install fonts images and that not good idea i think. But i will create gui for write fonts links there or select parameters and that gui will be have progressbar etc? My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
Jex Posted November 18, 2007 Author Share Posted November 18, 2007 (edited) I'm added gui : Edited November 18, 2007 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
BrettF Posted November 18, 2007 Share Posted November 18, 2007 I'm added gui :Good Job! Looks great Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now