Jump to content
Sign in to follow this  

IE script error dialog Yes button

Recommended Posts


hello everyone,

i am getting one IE script error dialog in which i need to click on Yes button. although i can simply close this window but my requirement is to click Yes button.

title of the window: "Internet Explorer Script Error"

content of the window: "Do you want to continue running scripts on this page?"

i have found one good example which i have modified as per my need as shown below:

Global $foundOne

Global $sleepVal

$sleepVal = 1000


While 1

process_window_if_it_exists("Internet Explorer Script Error", "The webpage you are viewing is trying to close the window.","&Yes")

if $foundOne < 10 Then

$sleepVal = 100

$foundOne = $foundOne + 1


$foundOne = 11

$sleepVal = 5000 ;5 seconds




func process_window_if_it_exists($winTitle, $checkMsg, $buttonName)

if WinExists($winTitle,"") Then

MsgBox(0, "", "title is: " & $winTitle)

;if StringLeft(ControlGetText($winTitle,"","Static2"),StringLen($checkMsg)) = $checkMsg then


;ControlClick("[TITLE:Internet Explorer Script Error;CLASS:#32770]", "Yes", "[CLASS:Button; TEXT:Yes; INSTANCE:1]")

controlclick("Do you want to continue running scripts on this page?", "&Yes", 6)

;Send("This is text!y")



$foundOne = 1



this is not working,please suggest.



Share this post

Link to post
Share on other sites

Hi jaideept,

You need to step through this program outputting your variables and return values along the way (consolewrite or msgbox). It will be obvious where the problem is once you know what's happening in your script.

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.