Sign in to follow this  
Followers 0
Wolfshare

Make two Commands

12 posts in this topic

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.

Share this post


Link to post
Share on other sites



Search your download directory in registry

and when 2 files exists in this directory, you can restart ! Posted Image


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

What command should i use?

Edited by Wolfshare

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
Share on other sites

Sorry, but my english isnt good.. So it's hard to understand to me, in what Line i should use that commands?

So?

Share this post


Link to post
Share on other sites
AutoIt.chm is the autoit help file ! Posted Image

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites

I think you could just use InetGet() for the download and cut out a lot of your script.


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

what the command: InetGet() do?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

But it will work with one download? How to make it wait untill two or three download will be completed?

Share this post


Link to post
Share on other sites

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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0