execute a line with some time period

chidambaram

Well-known member
Joined
Dec 27, 2007
Messages
62
Location
Chennai,India
Programming Experience
Beginner
Hi,

In my program i want to execute a line with some time period.

i am working with a web site. When i click a button in that site it shows one message box. That message box contains Ok and cancel buttons. I want to click that ok button.

SendKeys.Send("{ENTER}") will be used for pressing ok button.

My problem is program will execute the next line only when i click ok or cancel button in that message box.

So i want to make the program line, clicking that button will be execute certain time period. After that time period, Whether i clicked ok button or not, the control will come to next line for execution.

My code is

strvar1 = element1.getAttribute("alt")
If strvar1.StartsWith("Delete Ownership Resources") Then
MsgBox(element1.outerHTML)
element1.click()
SendKeys.Send("{ENTER}").
end if

In this code i need element1.click() will be execute only for 1 minute. After that SendKeys.Send("{ENTER}") have to execute.

urgent plz....

Thanks in advance...
 
Back
Top