will88 Posted June 21, 2008 Share Posted June 21, 2008 I'm trying to download a file to a certain location(C:\Downloads) this is what I have so far: $Name = 'Omen.rar' $URL = "http://files.wowace.com/Omen/Omen.zip" InetGet($URL,$Name,0,1) It downloads the file to where, the last file was downloaded to. I've tried to using filesavedialog() but then I have to click the save button Password-Keeper Link to comment Share on other sites More sharing options...
martin Posted June 21, 2008 Share Posted June 21, 2008 I'm trying to download a file to a certain location(C:\Downloads) this is what I have so far: $Name = 'Omen.rar' $URL = "http://files.wowace.com/Omen/Omen.zip" InetGet($URL,$Name,0,1) It downloads the file to where, the last file was downloaded to. I've tried to using filesavedialog() but then I have to click the save buttonHaven't you tried $Name = "C:\Downloads\Omen.rar" ? But why Omen.rar when you are downloading Omen.zip? Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
will88 Posted June 21, 2008 Author Share Posted June 21, 2008 (edited) Haven't you tried $Name = "C:\Downloads\Omen.rar" ? But why Omen.rar when you are downloading Omen.zip? Thanks, Idk why I didnt think of that -.- omen is an addon for world of warcraft that gets updated about everyday for some reason, so I made an autoit script to update it. But now it only downloads it and its not doing anything after that.. $Name = 'C:\Downloads\Omen.rar' $URL = "http://files.wowace.com/Omen/Omen.zip" InetGet($URL,$Name,0,1) then tooltip( "Extracting Addon..." , 69 , 14 , "" , 0 , 4 ) If FileExists("C:\Downloads\Omen.zip") Send("#r");opens run sleep(500) send("C:\Downloads\Omen.zip{enter}") winwait("Omen.zip - WinRAR") sleep(500) send('{altdown}w{altup}');extract sleep(2000) send('{altdown}{f4}{altup}');close winrar sleep(1000) If FileExists("C:\Downloads\Omen.zip") Then filedelete( "C:\Downloads\Omen.zip") tooltip( "Moving Addon to WoW folder." , 69 , 14 , "" , 0 , 4 ) sleep(1000) DirMove( "C:\Downloads\Omen", "C:\Program Files\World of Warcraft\Interface\Addons\" , 1 ) tooltip("") $answer = MsgBox(4, "World of Warcraft", "Would you like to run WoW?") If $answer = 7 Then EndIf If $answer = 6 Then Run('"C:\Program Files\World of Warcraft\Launcher.exe"') Exit EndIf EndIf EndIf Edited June 21, 2008 by will88 Password-Keeper Link to comment Share on other sites More sharing options...
martin Posted June 21, 2008 Share Posted June 21, 2008 Thanks, Idk why I didnt think of that -.- omen is an addon for world of warcraft that gets updated about everyday for some reason, so I made an autoit script to update it. But now it only downloads it and its not doing anything after that.. $Name = 'C:\Downloads\Omen.rar' $URL = "http://files.wowace.com/Omen/Omen.zip" InetGet($URL,$Name,0,1) then tooltip( "Extracting Addon..." , 69 , 14 , "" , 0 , 4 ) If FileExists("C:\Downloads\Omen.zip") Send("#r");opens run sleep(500) send("C:\Downloads\Omen.zip{enter}") winwait("Omen.zip - WinRAR") sleep(500) send('{altdown}w{altup}');extract sleep(2000) send('{altdown}{f4}{altup}');close winrar sleep(1000) If FileExists("C:\Downloads\Omen.zip") Then filedelete( "C:\Downloads\Omen.zip") tooltip( "Moving Addon to WoW folder." , 69 , 14 , "" , 0 , 4 ) sleep(1000) DirMove( "C:\Downloads\Omen", "C:\Program Files\World of Warcraft\Interface\Addons\" , 1 ) tooltip("") $answer = MsgBox(4, "World of Warcraft", "Would you like to run WoW?") If $answer = 7 Then EndIf If $answer = 6 Then Run('"C:\Program Files\World of Warcraft\Launcher.exe"') Exit EndIf EndIf EndIfIt looks to me like you try to open a file that doesn't exist. you downloaded as .rar as I said in my previous post, but you try to run .zip. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
H5O2OH Posted June 21, 2008 Share Posted June 21, 2008 Actually,it will work ,because it downloads .zip and searchs for .zip. Link to comment Share on other sites More sharing options...
Falcon213 Posted June 21, 2008 Share Posted June 21, 2008 (edited) Yes, check your file extensions as mentioned above.Also, try running winrar from the command line:RunWait("C:\path-to\winrar.exe x * C:\path-to-wow-addons-folder")Check your winrar documentation to make sure that's right, I haven't used it in a while.Edit:As for the filenames, this is what I saw in the posted code:$Name = 'C:\Downloads\Omen.rar'$URL = "http://files.wowace.com/Omen/Omen.zip"send("C:\Downloads\Omen.zip{enter}")So if run cannot find the file, it cannot run it. Edited June 21, 2008 by Falcon213 Link to comment Share on other sites More sharing options...
will88 Posted June 21, 2008 Author Share Posted June 21, 2008 (edited) thanks for the help everyone, Its working again. had a typo in the $Name variable Edited June 22, 2008 by will88 Password-Keeper 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