Jump to content

IE script error dialog Yes button


jaideept
 Share

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

;loop

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

Else

$foundOne = 11

$sleepVal = 5000 ;5 seconds

EndIf

sleep($sleepVal)

wend

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($winTitle,'',$buttonName)

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

;endif

sleep(100)

$foundOne = 1

EndIf

endfunc

this is not working,please suggest.

Thanks,

Jaideep

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...