Wolfshare Posted September 17, 2010 Share Posted September 17, 2010 Hey There,The Script Source:expandcollapse popupFileDelete("C:\Atsisiuntimai\asd.pdf") FileDelete("C:\Atsisiuntimai\asd.pdf.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") If WinExists("Atsiuntimo klaida") Then Do 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\asd.pdf") And Not FileExists("C:\Atsisiuntimai\asd.pdf.part")) Or ($t = 60 And Not FileExists("C:\Atsisiuntimai\asd.pdf") And Not FileExists("C:\Atsisiuntimai\asd.pdf.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 FileDelete("C:\Atsisiuntimai\asd.pdf") FileDelete("C:\Atsisiuntimai\asd.pdf.part") WinActivate("Atsiuntimo klaida") Send("{ENTER}") Sleep(500) $x = 0 $r = 0 $t = 0 WEndScript restarts after Mozilla Firefox totally complete downloading file named 'asd.pdf' But, i'm thinking, is that possible to make it restart after mozilla complete two file download.Example: Downloading two files: Asd.pdf and Matematika.pdf once. And when asd.pdf will will be done, the script will restart and download will be canceled, i'm thinking, is that possible to edit script and make it wait untill mozilla complete both downloads?Thanks for answer. Link to comment Share on other sites More sharing options...
wakillon Posted September 17, 2010 Share Posted September 17, 2010 Search your download directory in registryand when 2 files exists in this directory, you can restart ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Wolfshare Posted September 17, 2010 Author Share Posted September 17, 2010 (edited) What command should i use? Edited September 17, 2010 by Wolfshare Link to comment Share on other sites More sharing options...
LurchMan Posted September 17, 2010 Share Posted September 17, 2010 What command i should use? For starters: ShellExecute ("C:\Program Files\AutoIt3\AutoIt.chm") Then take a look at RegRead () and FileExists () Dating a girl is just like writing software. Everything's going to work just fine in the testing lab (dating), but as soon as you have contract with a customer (marriage), then your program (life) is going to be facing new situations you never expected. You'll be forced to patch the code (admit you're wrong) and then the code (wife) will just end up all bloated and unmaintainable in the end. Link to comment Share on other sites More sharing options...
Wolfshare Posted September 17, 2010 Author Share Posted September 17, 2010 For starters: ShellExecute ("C:\Program Files\AutoIt3\AutoIt.chm") Then take a look at RegRead () and FileExists () Sorry, but my english isnt good.. So it's hard to understand to me, in what Line i should use that commands? Link to comment Share on other sites More sharing options...
Wolfshare Posted September 19, 2010 Author Share Posted September 19, 2010 Sorry, but my english isnt good.. So it's hard to understand to me, in what Line i should use that commands?So? Link to comment Share on other sites More sharing options...
wakillon Posted September 19, 2010 Share Posted September 19, 2010 AutoIt.chm is the autoit help file ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
seandisanti Posted September 19, 2010 Share Posted September 19, 2010 I think you could just use InetGet() for the download and cut out a lot of your script. Link to comment Share on other sites More sharing options...
Wolfshare Posted September 25, 2010 Author Share Posted September 25, 2010 what the command: InetGet() do? Link to comment Share on other sites More sharing options...
somdcomputerguy Posted September 25, 2010 Share Posted September 25, 2010 what the command: InetGet() do?Besides taking up space in the Help file? InetGet - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Wolfshare Posted September 26, 2010 Author Share Posted September 26, 2010 But it will work with one download? How to make it wait untill two or three download will be completed? Link to comment Share on other sites More sharing options...
seandisanti Posted September 26, 2010 Share Posted September 26, 2010 But it will work with one download? How to make it wait untill two or three download will be completed?if you want, you could do a script that takes a command line parameter of a url, then another program that calls it as many times as you need 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