Script to click on ok of the pop up

S

swaroop

Hi ,
I am running a program which at the end of each run comes up with a
pop up saying whether every thing went fine or not. In that pop up I
have to click on either "ok" or "cancel" to go ahead and run my
program again. There is no way that I can avoid the popup. I want to
run my program for a large number of times and I want to find a way in
which, as soon as the popup comes, the mouse will automatically go
there and click on the "ok" button so that the next run can start
automatically.
I would really appreciate if any one can help me in this matter.

Thank you,
swaroop.
 
I

Ivo

I am running a program which at the end of each run comes up with a
pop up saying whether every thing went fine or not. In that pop up I
have to click on either "ok" or "cancel" to go ahead and run my
program again. There is no way that I can avoid the popup. I want to
run my program for a large number of times and I want to find a way in
which, as soon as the popup comes, the mouse will automatically go
there and click on the "ok" button so that the next run can start
automatically.
I would really appreciate if any one can help me in this matter.

Thank you,
swaroop.

If it is not a javascript program, it 's a little off topic in the
comp.lang.javascript newsgroup.
If it is, the "popup", which has all the characteristics of a basic
window.confirm() call, can be avoided by changing the code. If it's a
webpage which is not yours, think of a bookmarklet to automate certain
things from your browser only.
Could you show some relevant code or an url?
In any case, the mouse position is read-only.
Btw, if the original author of the program was a sensible person, there
might be reason for the repeated request for confirmation, why you need to
think about clicking "Cancel" once in while.
HTH
Ivo
 
R

Reply Via Newsgroup

swaroop said:
Hi ,
I am running a program which at the end of each run comes up with a
pop up saying whether every thing went fine or not. In that pop up I
have to click on either "ok" or "cancel" to go ahead and run my
program again. There is no way that I can avoid the popup. I want to
run my program for a large number of times and I want to find a way in
which, as soon as the popup comes, the mouse will automatically go
there and click on the "ok" button so that the next run can start
automatically.
I would really appreciate if any one can help me in this matter.

Thank you,
swaroop.

Perhaps you could try disabling Javascript just before you start the
program... or else, if you have access to the web pages, you could
change the alert to something like document.write - If all else fails,
employ a monkey to do it while you drink your coffee...

randelld
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,444
Messages
2,571,709
Members
48,796
Latest member
Greg L.
Top