Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pesky message box

Status
Not open for further replies.

jmprice

Programmer
Jan 24, 2005
8
US
I have a program the simulates mouse clicks in certain areas, but every once in a while, an error box whil pop up, which totaly screws up my program. I noticed, if I could follow each mouse click with an "enter" keypress, it "would" work fine. I have tried some experimenting with send key but cannot get it to work. I am kinda cutting snippets from multiple threads here. Is there anywhere or could someone explain to me exactly how to use send keys to simulate an enter to get rid of this message box that pops up.

Thanks
 
Why don't you track down the bug that's causing the error rather than throwing patches at it to get the program to ignore the problem?

Lee
 
Post your code and someone will be able to tell you where and why the error is raised, and how to get rid for good.

BB
 
You need to use error handling. There is a good faq on the subject.

For bugs that are hard to track I like to use the debug.print statement to give me information on how the execution is going in the immediate window.

zemp
 
Wait Wait. This error is not in my program. The program I wrote is controlling another program by mouse clicks. Every once in a while the other program will pop up a message box saying I have clicked the wrong button. By clicking enter it will automatically select the right button for me(the other app does this). So if I follow every mouse click my program does with a simulated enter. Everything will be ok. See what I mean?

 
>how to use send keys to simulate an enter ....

SendKeys "{ENTER}"


vladk
 
Man, all that typing for that. Oh well, thanks Vladk
 
>saying I have clicked the wrong button

One alternative would be to click the right button... ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top