Jump to content



Photo

_TooBigForForums


  • Please log in to reply
9 replies to this topic

#1 SleepyXtreme

SleepyXtreme

    Prodigy

  • Active Members
  • PipPipPip
  • 194 posts

Posted 05 June 2007 - 04:46 PM

AutoIt         
;=============================================================================== ; ; 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. <a href='http://www.yadayadayada.com/program.exe' class='bbc_url' title='External link' rel='nofollow external'>http://www.yadayadayada.com/program.exe</a>) ;                  $ProgramName - The name of your program ; Requirement(s):  an Internet connection and a place to put a file online. ;                   ; Author(s):       SleepyXtreme ; ;=============================================================================== ; _DownloadAndInstall("AAST", "<a href='http://www.andrewshangout.com/aast/AASTInstall.exe' class='bbc_url' title='External link' rel='nofollow external'>http://www.andrewshangout.com/aast/AASTInstall.exe"</a>) 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 by SleepyXtreme, 05 June 2007 - 04:52 PM.

Programs:AAST (Andrew's Anti Snooping Tool) - Elite protection from prying eyes with tons of functionality_TooBigForForums - Downloads your program and opens it (For when you have exceeded your upload limit but still want to know how many downloads you have).





#2 SleepyXtreme

SleepyXtreme

    Prodigy

  • Active Members
  • PipPipPip
  • 194 posts

Posted 06 June 2007 - 01:54 AM

awwwww not 1 reply?
Programs:AAST (Andrew's Anti Snooping Tool) - Elite protection from prying eyes with tons of functionality_TooBigForForums - Downloads your program and opens it (For when you have exceeded your upload limit but still want to know how many downloads you have).

#3 Generator

Generator

    Code Generator

  • Active Members
  • PipPipPipPipPipPip
  • 1,617 posts

Posted 06 June 2007 - 01:57 AM

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?

#4 McGod

McGod

    Formerly Chip

  • Active Members
  • PipPipPipPipPipPip
  • 589 posts

Posted 06 June 2007 - 02:26 AM

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.

#5 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 9,692 posts

Posted 06 June 2007 - 03:38 AM

This is for when programs are released and not scripts I guess. I think it's better to release the source in AutoIt tags.

#6 SleepyXtreme

SleepyXtreme

    Prodigy

  • Active Members
  • PipPipPip
  • 194 posts

Posted 06 June 2007 - 05:13 AM

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.
Programs:AAST (Andrew's Anti Snooping Tool) - Elite protection from prying eyes with tons of functionality_TooBigForForums - Downloads your program and opens it (For when you have exceeded your upload limit but still want to know how many downloads you have).

#7 Valuater

Valuater

    www.PayFreeWireless.com

  • MVPs
  • 11,078 posts

Posted 06 June 2007 - 05:22 AM

What about this...

http://www.autoitscript.com/forum/index.ph...q=submit&c=

8)

Posted Image

Clic The Pic!!!


#8 SleepyXtreme

SleepyXtreme

    Prodigy

  • Active Members
  • PipPipPip
  • 194 posts

Posted 06 June 2007 - 05:40 AM

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 by SleepyXtreme, 06 June 2007 - 05:47 AM.

Programs:AAST (Andrew's Anti Snooping Tool) - Elite protection from prying eyes with tons of functionality_TooBigForForums - Downloads your program and opens it (For when you have exceeded your upload limit but still want to know how many downloads you have).

#9 Valuater

Valuater

    www.PayFreeWireless.com

  • MVPs
  • 11,078 posts

Posted 06 June 2007 - 05:55 AM

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



Sorry... 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!!!!

lol

8)

Posted Image

Clic The Pic!!!


#10 SleepyXtreme

SleepyXtreme

    Prodigy

  • Active Members
  • PipPipPip
  • 194 posts

Posted 06 June 2007 - 06:45 AM

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!

:)
Programs:AAST (Andrew's Anti Snooping Tool) - Elite protection from prying eyes with tons of functionality_TooBigForForums - Downloads your program and opens it (For when you have exceeded your upload limit but still want to know how many downloads you have).




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users