Jump to content

Error in expresion


Wolfshare
 Share

Recommended Posts

Hello, i'm getting this error: Posted Image

The error is here

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

How can i fix that?

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")
        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
    If WinExists("Deposit file - Mozilla Firefox") And Not WinActive("Deposit file - Mozilla Firefox") Then WinActivate("Deposit file - Mozilla Firefox")
    FileDelete("C:\Atsisiuntimai\asd.pdf")
    FileDelete("C:\Atsisiuntimai\asd.pdf.part")
    Sleep(500)
    $x = 0
    $r = 0
    $t = 0
WEnd
Link to comment
Share on other sites

you need to move

($t = 60 And Not FileExists("C:\Atsisiuntimai\asd.pdf") And Not FileExists("C:\Atsisiuntimai\asd.pdf.part")) Or (WinExists("Atsiuntimo klaida"))

up to the same line as the Until

or add an _ at the end of the Until line

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
Share on other sites

you need to move

($t = 60 And Not FileExists("C:\Atsisiuntimai\asd.pdf") And Not FileExists("C:\Atsisiuntimai\asd.pdf.part")) Or (WinExists("Atsiuntimo klaida"))

up to the same line as the Until

or add an _ at the end of the Until line

But after i'll move to same line as Until, the T= Doesnt work then.. This command means when script should close..
Link to comment
Share on other sites

You probably have to check your Or and Not groupings. I will take a closer look at that.

*edit*

Maybe like

(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"))

Can't test it here at work though

Edited by kaotkbliss

010101000110100001101001011100110010000001101001011100110010000

001101101011110010010000001110011011010010110011100100001

My Android cat and mouse game
https://play.google.com/store/apps/details?id=com.KaosVisions.WhiskersNSqueek

We're gonna need another Timmy!

Link to comment
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
 Share

  • Recently Browsing   0 members

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