markusss Posted October 12, 2005 Share Posted October 12, 2005 (edited) Here my small downloader!My first "real" project, but turned out pretty good!http://www.autoitscript.com/fileman/users/tdlrali/Downloader/ssofdownloader108.jpgFor script look http://www.autoitscript.com/fileman/users/tdlrali/Downloader/Please post comments & bugsThxtdlrali (Felix) Edited October 28, 2005 by Felix N. Link to comment Share on other sites More sharing options...
w0uter Posted October 12, 2005 Share Posted October 12, 2005 i dont see anything weird in your code. looks pretty nice to me. good job. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll Link to comment Share on other sites More sharing options...
layer Posted October 12, 2005 Share Posted October 12, 2005 (edited) Weird because I made like the same exact thing today But I like your setup better, good work ! EDIT: One suggestion to make it look better. Line up the filesize label and input field with the 2 above it. It will look much neater Edited October 12, 2005 by layer FootbaG Link to comment Share on other sites More sharing options...
busysignal Posted October 14, 2005 Share Posted October 14, 2005 Weird because I made like the same exact thing today But I like your setup better, good work ! EDIT: One suggestion to make it look better. Line up the filesize label and input field with the 2 above it. It will look much neater You should post it so that we can take a look at it.. Cheers.. Link to comment Share on other sites More sharing options...
busysignal Posted October 15, 2005 Share Posted October 15, 2005 Here my small downloader!My first "real" project, but turned out pretty good!Please post comments & bugsThxtdlrali (Felix)Felix, nice and simple downloader. Way to good for your first script! Cheers.. Link to comment Share on other sites More sharing options...
GaryFrost Posted October 15, 2005 Share Posted October 15, 2005 Here my small downloader!My first "real" project, but turned out pretty good!For script see attachmentPlease post comments & bugsThxtdlrali (Felix) Not bad, might want a way to stop the downloadHere's your script modified to let the user hit Esc to stop the downloadAlso, thought it would look better with a percent progress bar (requires beta)Screen shots and your source modified and include file below:downloader.au3Progress.au3 SciTE for AutoItDirections for Submitting Standard UDFs  Don't argue with an idiot; people watching may not be able to tell the difference.  Link to comment Share on other sites More sharing options...
busysignal Posted October 16, 2005 Share Posted October 16, 2005 Not bad, might want a way to stop the downloadHere's your script modified to let the user hit Esc to stop the downloadAlso, thought it would look better with a percent progress bar (requires beta)Screen shots and your source modified and include file below:qafrost, nice additions..! I like the progress bar idea. I some other ideas to add to this script. Hopefully they are not too crazy and crash it. Cheers.. Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 16, 2005 Share Posted October 16, 2005 I had an idea like this only slightly different. It would monitor the clipboard for any non-webpage format, http: protocol, filenames. Then it would ask where you want to save to but I never got around to making it. Maybe a suggestion for yours? Link to comment Share on other sites More sharing options...
busysignal Posted October 16, 2005 Share Posted October 16, 2005 Not bad, might want a way to stop the downloadHere's your script modified to let the user hit Esc to stop the downloadAlso, thought it would look better with a percent progress bar (requires beta)Screen shots and your source modified and include file below:qafrost, here is an updated version to what you modified. I have labeled it v1.03b. I added a _Filesize() display routine which allows you to chose how to display filesize text. This is a nice add-on to any script. Syntax: _Filesize(value in bytes, format type, decimal places); returns a formatted string.Also I added _FileReplace(), which test to see if a file exist and verifies if you want to overwrite it. This function has elements specific for this script so I made it part of it.Check it out and let me know what you think. I have other ideas but that will have to wait.Cheers.. downloader_1.03b.au3 _Filesize.au3 Link to comment Share on other sites More sharing options...
markusss Posted October 16, 2005 Author Share Posted October 16, 2005 (edited) Hey!Thanx for your replies and changes!I downloaded the beta and installed it, but when i run the program, add the links and press the download button, the program just quits.....Am i doing anything wrong? I installed the beta to [My AutoIt Folder]\beta, like it was suggested while installing the beta and i clicked Beta Compile in SciTE. But the program just quits like i said abovePlease helpFelix N. (tdlrali)1Just to make it more clear:I put all the files in one folder, so thats not the problem. 2Don't read the stuff above! It didn't work due to an error in the _FileReplace functionFunc _FileReplace($sPathFrom, $sPathTo) Local $filename, $sFileCheck, $answer $filename = StringTrimLeft($sPathFrom, StringInStr($sPathFrom, "/", 0, -1)) $localfile = $sPathTo & "\" & $filename $sFileCheck = FileExists($localfile) If $sFileCheck = 1 Then $answer = MsgBox(36, "File Existing - Error", "File Found: " & $localfile & @CRLF & "Do you want to replace this existing file? ") Select Case $answer = 6; YES Return 1 Case $answer = 7; NO Return 0 EndSelect Else ;<= added by Felix N. Return 1;<= added by Felix N. EndIf EndFunc ;==>_FileReplaceWithout the stuff i added it always returned 0, thus exiting the script.... Attached is the compiled exe (remove the au3 ending for the file "Downloader.exe.au3) and the 2 script files.To compile the script, both files must be in the same folder and you need the beta version of AutoIt (just to make sure new people like me know how to compile^^, not for you pr0s)Please post your compliments (just kiddin ), comments and bugs!Thanks again to the people that helped me! Felix N. (tdlrali)HF!3OMG where are the files??Now they're there^^ Edited October 16, 2005 by Felix N. Link to comment Share on other sites More sharing options...
tonedeaf Posted October 17, 2005 Share Posted October 17, 2005 Very good... Link to comment Share on other sites More sharing options...
busysignal Posted October 18, 2005 Share Posted October 18, 2005 Hey!Thanx for your replies and changes!I downloaded the beta and installed it, but when i run the program, add the links and press the download button, the program just quits.....Am i doing anything wrong? I installed the beta to [My AutoIt Folder]\beta, like it was suggested while installing the beta and i clicked Beta Compile in SciTE. But the program just quits like i said abovePlease help..1Just to make it more clear:I put all the files in one folder, so thats not the problem. 2Don't read the stuff above! It didn't work due to an error in the _FileReplace functionFunc _FileReplace($sPathFrom, $sPathTo)Â Without the stuff i added it always returned 0, thus exiting the script.... Attached is the compiled exe (remove the au3 ending for the file "Downloader.exe.au3) and the 2 script files.To compile the script, both files must be in the same folder and you need the beta version of AutoIt (just to make sure new people like me know how to compile^^, not for you pr0s)Please post your compliments (just kiddin ), comments and bugs!Thanks again to the people that helped me! Felix N. (tdlrali)HF!@Felix, regaring the [.83] version, just uninstall the old version and install the new one! Regarding, _FileReplace function I did notice that it had a problem with the Return Value being "0" when it should not have. Thanks for the FIX!! I notice you did not like my text input of the size type and changed it to numbers! I was thinking about that but left it text so it would be more noticable. But I see that yours works as well. Also, I like the display windows do not appear till the Download button is pressed. But you might notice that the Downloaded size is not updated at the end of the download. Thus it down not match the Inetgetfile value.Looks good so far. I have some other ideas to add and will post them as I get to it.. Keep up the good work!Cheers.. Link to comment Share on other sites More sharing options...
markusss Posted October 18, 2005 Author Share Posted October 18, 2005 Hey @ll! BTW thanks busy your UDFs are really a good addition to my script! I changed your _Filesize since i don't like having stuff like "GB" in functions, although it makes it more clear. I also removed the round functions from the "Conversion Chart" and added it at the end, which gives more accurate values (i think ) I added one line to the download loop so it updates the Downloaded size at the end. I think it didn't work because the script downloads some more bytes until it updates the field again, so the value is still a little bit smaller than the actual size! Was no problem to change at all^^ I was thinking about a msgbox that shows you your download speed at the end, would be nice! Any further comments are welcome Felix N. (tdlrali) Link to comment Share on other sites More sharing options...
busysignal Posted October 19, 2005 Share Posted October 19, 2005 Hey @ll!BTW thanks busy your UDFs are really a good addition to my script!I changed your _Filesize since i don't like having stuff like "GB" in functions, although it makes it more clear.I also removed the round functions from the "Conversion Chart" and added it at the end, which gives more accurate values (i think )I added one line to the download loop so it updates the Downloaded size at the end. I think it didn't work because the script downloads some more bytes until it updates the field again, so the value is still a little bit smaller than the actual size! Was no problem to change at all^^I was thinking about a msgbox that shows you your download speed at the end, would be nice!Any further comments are welcomeFelix N. (tdlrali)Nice adds. The download speed could be added to the last display box with the file location. I see you implemented the '0 Bytes' return instead of an error message.. Someone else had mentioned it on another thread where I posted the UDF.Cheers.. Link to comment Share on other sites More sharing options...
markusss Posted October 19, 2005 Author Share Posted October 19, 2005 I read the "0 Bytes" thread, thats why I implemented it^^. I have the script with the download speed on my home computer, i'll submit it later today. Was pretty easy to implement Any more suggestions? Felix N. (tdlrali) Link to comment Share on other sites More sharing options...
SpookMeister Posted October 19, 2005 Share Posted October 19, 2005 Any more suggestions?Yes, please change your avatar... I don't even want to try to explain having that on my screen when my boss comes by. [u]Helpful tips:[/u]If you want better answers to your questions, take the time to reproduce your issue in a small "stand alone" example script whenever possible. Also, make sure you tell us 1) what you tried, 2) what you expected to happen, and 3) what happened instead.[u]Useful links:[/u]BrettF's update to LxP's "How to AutoIt" pdfValuater's Autoit 1-2-3 Download page for the latest versions of Autoit and SciTE[quote]<glyph> For example - if you came in here asking "how do I use a jackhammer" we might ask "why do you need to use a jackhammer"<glyph> If the answer to the latter question is "to knock my grandmother's head off to let out the evil spirits that gave her cancer", then maybe the problem is actually unrelated to jackhammers[/quote] Link to comment Share on other sites More sharing options...
markusss Posted October 19, 2005 Author Share Posted October 19, 2005 (edited) Ok I CHANGED MY AVATAR! Here the new script that shows the downloadspeed at the end:http://www.autoitscript.com/fileman/users/tdlrali/Downloader/ (I will always post the new version there!)Hope you guys find bugs this time^^HF!Felix N. (tdlrali) Edited October 19, 2005 by Felix N. Link to comment Share on other sites More sharing options...
Valuater Posted October 19, 2005 Share Posted October 19, 2005 how about an "Open File" or Open Folder" after download is complete like this 1st add... $win1 = $win1 = GUICreate("Downloader 1.06b", 380, 230) 2nd add/change If $Download Then $speed = _DownloadSpeed($rmtfile_size,$starttime) _Progress_Update ($Progress_1, 100) GUICtrlSetData($Input_dled,GUICtrlRead($Input_size)) ;MsgBox(64, "Download finished!", "Download finished!" & @CRLF & "File can be found at:" & @CRLF & $localfile & @CRLF & @CRLF & "Your downloadspeed:" & @CRLF & $speed) Open_File() ExitLoop Else 3rd add the function Func Open_File() Sleep(4000) GUISetState( @SW_HIDE,$win1) $win2 = GUICreate("Downloader 1.05b", 380, 230) $Button_open = GUICtrlCreateButton("Open File", 20, 180, 100, 30) $Button_view = GUICtrlCreateButton("Open Folder", 140, 180, 100, 30) $Button_cancel = GUICtrlCreateButton("Exit", 260, 180, 100, 30) $Location = GUICtrlCreateInput($localfile, 70, 50, 230, 20) $Label_finished = GUICtrlCreateLabel("Download finished!", 10, 20, 250, 20) $Label_saved = GUICtrlCreateLabel("Saved to:", 10, 50, 50, 20) GUISetState() While 2 $msg2 = GUIGetMsg() Select Case $msg2 = $GUI_EVENT_CLOSE Return Case $msg2 = $Button_open Run(@ComSpec & " /C START " & $localfile, "", @SW_MINIMIZE) Case $msg2 = $Button_view Run( "explorer.exe " & $Input_to_tmp, "") Case $msg2 = $Button_cancel Return EndSelect WEnd GUIDelete($win2) GUISetState( @SW_SHOW,$win1) EndFunc THIS does not seem to work if the file is placed in "Program Files' OTHERWISE it works great 8) Link to comment Share on other sites More sharing options...
busysignal Posted October 21, 2005 Share Posted October 21, 2005 I read the "0 Bytes" thread, thats why I implemented it^^.I have the script with the download speed on my home computer, i'll submit it later today.Was pretty easy to implement Any more suggestions?Felix N. (tdlrali)I figured as much! Great, I will check it out..Cheers.. Link to comment Share on other sites More sharing options...
busysignal Posted October 25, 2005 Share Posted October 25, 2005 Ok I CHANGED MY AVATAR! Here the new script that shows the downloadspeed at the end:http://www.autoitscript.com/fileman/users/tdlrali/Downloader/ (I will always post the new version there!)Hope you guys find bugs this time^^HF!Felix N. (tdlrali)@FelixN., just downloaded the v1.06 and checked out your download speed addon, very nice. ?? Do you think there is any reason to add a ByteCompare to see if the "$rmtfile_size" matchs the @InetGetBytesRead total? It might be over kill. Let me know.. Cheers.. 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