Jump to content
Sign in to follow this  

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")

Share this post

Link to post
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

Share this post

Link to post
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

Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.