Jump to content

WEnd^Error


Recommended Posts

Hi guys, I've written a script that is about 600 lines long and takes about 8 minutes to go through. It interacts both with a program and it's embedded browser.

The problem is sometimes, when I'm automating the embedded browser I get an error stating:

Line 585 (File: Location of IE.au3):

WEnd

WEnd^ERROR

Error:The requested action with this object has failed.

I'm trying to debug my script, but I find that this error shows up in seemingly random places, and that sometimes my script will run perfectly through, with no errors, but other times these statments show up and I have to run the entire script again.

Could I have some insight into the nature of this error, and what I can do to prevent it?

Thanks,

Athos

Edited by Athos
Link to comment
Share on other sites

There's a chance you may have left either a conditional statement or loop open in your code prior to the call to w/e function is in IE.au3.

Make sure you have all opening/closing brackets and start/end commands correct. (i.e. If [...] EndIf, While [...] WEnd, For [...] Next etc.)

Edited by mechaflash213
Spoiler

“Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.”

 

Link to comment
Share on other sites

I just checked and all my while and for loops end correctly, so I don't think that is the problem. Again, sometimes my script runs perfectly.

The only lead I have, is I think it might have to do with Sleep Statements within my code. The errors seem less likely when I take them out. Again not sure why..

Then again it may have no effect whatsoever.

Edited by Athos
Link to comment
Share on other sites

This has been discussed a few times on the forum. Please check or other threads.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Water, I actually completely went through that thread before posting this. I believe my situation is different than that OP because my errors are seemingly randomly occuring. The OP kept getting the same error at the same consistant place. Therefore, I figured this was worth its own discussion.

Not to mention, I'm using an Embedded browser, and not IE create.

Edited by Athos
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

×
×
  • Create New...