Jump to content

Download and Copy Script

Recommended Posts


I have a script that downloads a file from the internet and then needs to copy the file to a memory card.

What am i doing wrong?

#cs ----------------------------------------------------------------------------

 AutoIt Version:
 Author:         Michiel Westerbeek

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here
#include <GUIConstants.au3>
$Name = InputBox( "Downloader", "Code:")
GUICreate("Downloader", 200, 100)
GUICtrlCreateLabel("Click on Standard or Other.", 20, 10)
$standaardbutton = GUICtrlCreateButton("Standard", 125, 50, 60)
$aangepastbutton = GUICtrlCreateButton("Other", 25, 50, 60)

While 1
  $msg = GUIGetMsg()

    Case $msg = $standaardbutton
      InetGet("http://www.google.nl/$Name.jpg", "C:/Temp/$Name.jpg", 1, 1)

While @InetGetActive
  TrayTip("Downloading", "Bytes = " & @InetGetBytesRead, 10, 16)
      FileCopy( "C:\Temp\$Name.jpg", "D:/")
      Msgbox(0, "Downloader", "Done")

    Case $msg = $aangepastbutton
      $Driveletter = InputBox( "NDS Loader", "Typ your DVD-Drive Letter.")
      $Memoryletter = Inputbox( "Downloader", "Typ your Memory Card Letter. ")
      $Driveletter = Filecopy ( ":/$Name.jpg", "$Memoryletter:/")
      Msgbox(0, "Downloader", "Done")
Link to comment
Share on other sites

hello,i think this line of code mess up everything

InetGet("http://www.google.nl/" & $Name & ".jpg", "C:/Temp/" & $Name & ".jpg", 1, 1)
FileCopy( "C:\Temp\" & $Name & ".jpg", "D:/")

[quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...