Wolfshare Posted October 5, 2010 Share Posted October 5, 2010 Hello, i have the script, it works almost perfect, but one problem, when internet connection dead, and after it's renew ( i mean reset to normal and continue work) the script not working, because it waiting untill the download will be completed. Script downloading file, but if internet connection dead, the download will pauze, and after it will work sucess the downloading not continuing, so i have to fix the script somehow to make timer or what to restart it every like ~60 second... The code: expandcollapse popupFileDelete("C:\Atsisiuntimai\Setup.exe") FileDelete("C:\Atsisiuntimai\Setup.exe.part") $i = 0 $x = 0 $r = 0 $t = 0 While $i <= 10 Do Run("Conexion.cmd") WinWaitActive("AOL 9.5 - Connected, Signed-On", "", 60) If WinExists("AOL 9.5 - Connected, Signed-On") Then $x = 1 Until $x = 1 If WinExists("Deposit file - Mozilla Firefox") Then WinActivate("Deposit file - Mozilla Firefox") EndIf WinActivate("Deposit file - Mozilla Firefox") WinActivate("Atsiuntimo klaida") Send("{ENTER}") Sleep(500) MouseMove(198, 589) MouseClick("left") MouseMove(31, 60) MouseClick("left") MouseMove(258, 429) MouseClick("left") Sleep(500) MouseMove(268, 589) MouseMove(663, 589) Send("{CTRLDOWN}{PGDN}{CTRLUP}") Sleep(500) Do Sleep(1000) $t = $t + 1 Until (FileExists("C:\Atsisiuntimai\Setup.exe") And Not FileExists("C:\Atsisiuntimai\Setup.exe.part")) Or ($t = 60 And Not FileExists("C:\Atsisiuntimai\Setup.exe") And Not FileExists("C:\Atsisiuntimai\Setup.exe.part")) Or (WinExists("Atsiuntimo klaida")) If WinExists("Atsiuntimo klaida") Or WinExists("Restarting Aol") Then Do WinActivate("Atsiuntimo klaida") WinActivate("Restarting Aol") Until WinActive("Atsiuntimo klaida") Or WinActive("Restarting Aol") Send("{ENTER}") EndIf If WinExists("Deposit file - Mozilla Firefox") And Not WinActive("Deposit file - Mozilla Firefox") Then WinActivate("Deposit file - Mozilla Firefox") FileDelete("C:\Atsisiuntimai\Setup.exe") FileDelete("C:\Atsisiuntimai\Setup.exe.part") Sleep(500) $x = 0 $r = 0 $t = 0 WEnd Anyone can Support me? Link to comment Share on other sites More sharing options...
Bert Posted October 5, 2010 Share Posted October 5, 2010 Your on dialup? The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Wolfshare Posted October 5, 2010 Author Share Posted October 5, 2010 (edited) Yes, on Dialup. Home Network, from My computer - on wireless. Edited October 5, 2010 by Wolfshare Link to comment Share on other sites More sharing options...
Wolfshare Posted October 5, 2010 Author Share Posted October 5, 2010 Uh, someone? Link to comment Share on other sites More sharing options...
KaFu Posted October 5, 2010 Share Posted October 5, 2010 Maybe better use the InetGet() function? Take a look at the help-file sample. OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2022-Nov-26) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Feb-16) HMW - Hide my Windows (2018-Sep-16) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2023-Jun-03) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
BrewManNH Posted October 5, 2010 Share Posted October 5, 2010 Looking at your Do loop I have a question, is there the possibility that Setup.exe and Setup.exe.part exist in the folder at the same time? If so you're not going to exit out of the loop. Also, in your second check where you check after 60 seconds for the files, you're looking to see if both files don't exist in the folder, if either file is in the folder after your 60 seconds has elapsed you won't exit the loop. I think you need to look at your Do loop conditions to make sure that they are the way you want them to be. BTW, you never increment the $I variable, so it will always be <10 and your While loop will loop forever. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
Wolfshare Posted October 5, 2010 Author Share Posted October 5, 2010 Maybe better use the InetGet() function? Take a look at the help-file sample. Eh, thanks but i tried, i can't write sucess script with Inget :< its to hard :[[[ Tried today. Link to comment Share on other sites More sharing options...
Wolfshare Posted October 5, 2010 Author Share Posted October 5, 2010 Looking at your Do loop I have a question, is there the possibility that Setup.exe and Setup.exe.part exist in the folder at the same time? If so you're not going to exit out of the loop. Also, in your second check where you check after 60 seconds for the files, you're looking to see if both files don't exist in the folder, if either file is in the folder after your 60 seconds has elapsed you won't exit the loop. I think you need to look at your Do loop conditions to make sure that they are the way you want them to be. BTW, you never increment the $I variable, so it will always be <10 and your While loop will loop forever.Mhh, would be nice if after that 60 seconds anyway, doesn't care setup.exe exist or doesn't, but would be nice if the script restart itself.Now it should only wait untill Setup.exe will exist, Setup.exe.part come with setup.exe while it's downloading. Link to comment Share on other sites More sharing options...
Wolfshare Posted October 5, 2010 Author Share Posted October 5, 2010 anyone? Link to comment Share on other sites More sharing options...
Wolfshare Posted October 5, 2010 Author Share Posted October 5, 2010 Or just is that possible to make command which will cancell uncompleted downloads in the script ToP? Like that(download which are lagged) Link to comment Share on other sites More sharing options...
Wolfshare Posted October 6, 2010 Author Share Posted October 6, 2010 Please someone :S 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