Jump to content

Recommended Posts

Posted

Hey There,

The Script Source:

FileDelete("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
WEnd

Script 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.

Posted

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.

Posted

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?
Posted

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

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...