happylinks Posted March 16, 2008 Share Posted March 16, 2008 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? expandcollapse popup#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 Link to comment Share on other sites More sharing options...
d4rk Posted March 16, 2008 Share Posted March 16, 2008 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 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