Sign in to follow this  
Followers 0
happylinks

Download and Copy Script

2 posts in this topic

Hey,

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: 3.2.10.0
 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)
GUISetState(@SW_SHOW)

While 1
  $msg = GUIGetMsg()

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

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

    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")
      Exit
      ExitLoop
  EndSelect
WEnd

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  
Followers 0