Jump to content
Sign in to follow this  
Wolfshare

I'm geting Error

Recommended Posts

Wolfshare

Hello, i have writed code and getting error :// Who can help me to fix this code?

WinActivate("Deposit file - Mozilla Firefox")
sleep(500)
MouseMove(298,329)
MouseClick("middle")
sleep(500)
MouseMove(690,590)
Send("{CTRLDOWN}{PGDN}{CTRLUP}")
sleep(500)
Do
sleep(1000)
$t = $t + 1
Until (FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")) Or ($t = 60 And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")) Or (WinExists("Download Erorr"))
If WinExists("Download Erorr") Then
Do
WinActivate("Download Erorr")
Until WinActive("Download Erorr")
Send("{ENTER}")
sleep(1000)
Endif
If FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") Then
FileDelete("C:\Downloads\G.Vitkus_apie_referendumus.pdf")
FileDelete("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")
sleep(500)
$x = 0
$r = 0
$t = 0

Thanks.

Share this post


Link to post
Share on other sites
FlyinRiz

Hello, i have writed code and getting error :// Who can help me to fix this code?

WinActivate("Deposit file - Mozilla Firefox")
sleep(500)
MouseMove(298,329)
MouseClick("middle")
sleep(500)
MouseMove(690,590)
Send("{CTRLDOWN}{PGDN}{CTRLUP}")
sleep(500)
Do
sleep(1000)
$t = $t + 1
Until (FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")) Or ($t = 60 And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")) Or (WinExists("Download Erorr"))
If WinExists("Download Erorr") Then
Do
WinActivate("Download Erorr")
Until WinActive("Download Erorr")
Send("{ENTER}")
sleep(1000)
Endif
If FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") Then
FileDelete("C:\Downloads\G.Vitkus_apie_referendumus.pdf")
FileDelete("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")
sleep(500)
$x = 0
$r = 0
$t = 0

Thanks.

You are checking for Erorr wrong. ;) But seriously, change the spelling for your Win...() statements and that should help. Where are you getting an error message?

You can also use

WinActivate()

WinWaitActive()

instead of your

Do

WinActivate()

Until WinActive()

-Aaron

Edited by FlyinRiz

Share this post


Link to post
Share on other sites
Wolfshare

getting error when trying to run the script, i'm still getting same error, can u help me fix and copy the code here?

Thanks.

Share this post


Link to post
Share on other sites
FlyinRiz

getting error when trying to run the script, i'm still getting same error, can u help me fix and copy the code here?

Thanks.

Ok first of all, re-read my question above.

Second, unless you plan on paying me, I'm not going to just write a script for you. We are here to help you understand and learn how to code your own scripts, not do the work for you.

Third, in addition to where, what does the error message say?

-Aaron

Share this post


Link to post
Share on other sites
AlmarM

I see a missing EndIf at the very bottom. ;)


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites
Wolfshare

WinActivate("Deposit file - Mozilla Firefox")
sleep(500)
MouseMove(298,362)
MouseClick("left")
sleep(500)
MouseMove(690,580)
Send("{CTRLDOWN}{PGDN}{CTRLUP}")
sleep(500)
Do
sleep(1000)
Until (FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")) Or ($t = 60 And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")) Or (WinExists("Download Erorr"))
If FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") Then
FileDelete("C:\Downloads\G.Vitkus_apie_referendumus.pdf")
FileDelete("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")
sleep(500)

post-59586-12817908586214_thumb.png

Share this post


Link to post
Share on other sites
AlmarM

I see a missing EndIf at the very bottom. :)

WinActivate("Deposit file - Mozilla Firefox")
sleep(500)
MouseMove(298,362)
MouseClick("left")
sleep(500)
MouseMove(690,580)
Send("{CTRLDOWN}{PGDN}{CTRLUP}")
sleep(500)
Do
sleep(1000)
Until (FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")) Or ($t = 60 And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") And Not FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")) Or (WinExists("Download Erorr"))
If FileExists("C:\Downloads\G.Vitkus_apie_referendumus.pdf") Then
FileDelete("C:\Downloads\G.Vitkus_apie_referendumus.pdf")
FileDelete("C:\Downloads\G.Vitkus_apie_referendumus.pdf.part")
sleep(500)

Read my post again. ;)

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.