SleepyXtreme Posted June 5, 2007 Share Posted June 5, 2007 (edited) expandcollapse popup;=============================================================================== ; ; Function Name: _DownloadAndInstall ; Description:: Downloads your program and opens it (For when you have exceeded your upload limit but still want to know how many downloads you have). ; Parameter(s): $ProgramLocation - The location of the install file (on the internet, i.e. http://www.yadayadayada.com/program.exe) ; $ProgramName - The name of your program ; Requirement(s): an Internet connection and a place to put a file online. ; ; Author(s): SleepyXtreme ; ;=============================================================================== ; _DownloadAndInstall("AAST", "http://www.andrewshangout.com/aast/AASTInstall.exe") Func _DownloadAndInstall($ProgramName, $ProgramLocation) $question = MsgBox(4, $ProgramName, "Would you like to download " &$ProgramName) if $question = 7 then Exit $ping = Ping("www.google.com") $retry = 0 While 1 If $ping = 0 Then $retry = MsgBox(5, $ProgramName, "Error! Please connect to the Internet and try again! ") EndIf If $retry = 4 Then Local $ping = Ping("www.google.com") EndIf If $retry = 2 Then Exit EndIf If $ping <> 0 Then ExitLoop WEnd If $ping <> 0 Then FileDelete(@TempDir & "/"& $ProgramName & ".exe") $size = InetGetSize($ProgramLocation) If $size = 0 Then MsgBox(0, $ProgramName, "The update server is temporarily unavailable. Please try again later.") Exit EndIf InetGet($ProgramLocation, @TempDir & "/"& $ProgramName & ".exe", 1, 1) While @InetGetActive TrayTip($ProgramName, "Downloading " &$ProgramName & ": Program: Bytes = " & @InetGetBytesRead, 10, 16) Sleep(50) WEnd TrayTip("", "", 0) TrayTip($ProgramName, "Downloading Complete", 10, 16) $question2 = MsgBox(4, $ProgramName, "Would you like to install " &$ProgramName) if $question2 = 7 then Exit sleep(2000) Run(@TempDir & "/"& $ProgramName & ".exe") Exit EndIf EndFunc ;==>_DownloadandInstall I assumed this could be very useful for those who create many programs but still want to know how many people have downloaded their program. Maybe a sticky ? Also, I'm not sure if this is a UDF since you would want to create an .exe with just this stuff credits: Sleepyxtreme and RazerM(I used the pinging method in the beginning from one of his posts) Edited June 5, 2007 by SleepyXtreme Link to comment Share on other sites More sharing options...
SleepyXtreme Posted June 6, 2007 Author Share Posted June 6, 2007 awwwww not 1 reply? Link to comment Share on other sites More sharing options...
Generator Posted June 6, 2007 Share Posted June 6, 2007 awwwww not 1 reply?Downloads your program and opens it (For when you have exceeded your upload limit but still want to know how many downloads you have).Explain bit more? Link to comment Share on other sites More sharing options...
McGod Posted June 6, 2007 Share Posted June 6, 2007 My assusmption is that when you have a big program, he puts this script in place of it and when you download this and run it, it downloads the correct big file, allowing for the counter of the downloader. [indent][center][u]Formerly Chip[/u][/center]~UDFs~[/indent][u]IRC.au3 - Allows you to connect to IRC ServersINetCon.au3 - Connects/Disconnects/Check Status of InternetHardware Key - Creates a unique hardware hashScriptComm - Allows you to communicate between scripts using WM_COPYDATA[/u][indent]~Programs~[/indent][indent]SimonAu3ForumsIRC Bot~Web Site~Web Autoit Example[/indent][indent][b][/b][/indent][u][/u] Link to comment Share on other sites More sharing options...
Richard Robertson Posted June 6, 2007 Share Posted June 6, 2007 This is for when programs are released and not scripts I guess. I think it's better to release the source in AutoIt tags. Link to comment Share on other sites More sharing options...
SleepyXtreme Posted June 6, 2007 Author Share Posted June 6, 2007 well people still upload their .au3 files so it can be used for source files as well. and Chip is right on the money . I figured that if you work hard to produce something, ie a script, a program whatever, you want to know how much the community recognizes it. a measure of this is the amount of downloads your script/program has. And since the autoit forums limits you to a total of 1mb or less, i figured there's a vast majority of people who exceed this number who have to post links to their programs because they can't upload it. therefore, they can't see how many people have downloaded their program. However, if you use my script, you just put the file location in, either au3 or exe or zip, whatever, and people can download it and when they open it, it will download your program and still tally +1 to the download score. Link to comment Share on other sites More sharing options...
Valuater Posted June 6, 2007 Share Posted June 6, 2007 What about this...http://www.autoitscript.com/forum/index.ph...q=submit&c=8) Link to comment Share on other sites More sharing options...
SleepyXtreme Posted June 6, 2007 Author Share Posted June 6, 2007 (edited) ummmm valuator please explain. is that unlimited? edit: Wow, i've never noticed that section of the site before. You should make it more well known because i've been on the site for weeks and i think i've only seen it twice from someone else linking to it. Maybe on the homepage under downloads, "here are some of the published examples of using AutoIt" or something Edited June 6, 2007 by SleepyXtreme Link to comment Share on other sites More sharing options...
Valuater Posted June 6, 2007 Share Posted June 6, 2007 ummmm valuator please explain. is that unlimited?edit:Wow, i've never noticed that section of the site before. You should make it more well known because i've been on the site for weeks and i think i've only seen it twice from someone else linking to it. Maybe on the homepage under downloads, "here are some of the published examples of using AutoIt" or somethingSorry... I didn't know, that you didn't know, that I thought, that you thought that, that i figured, that you figured that....never mind... just use it!!!!lol8) Link to comment Share on other sites More sharing options...
SleepyXtreme Posted June 6, 2007 Author Share Posted June 6, 2007 Make it more well known!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Post a sticky about it, put it in the downloads section of the website, do something to spread the word! 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