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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Easy question...

Status
Not open for further replies.

dukeslater

Technical User
Jan 16, 2001
87
US
I need a command to close certain applications, and this code works fine to do that (as an example):

Appactivate taskid1
Sendkeys "%fx"

However, when I add the additional code for the second, third, etc. application it goes haywire. I believe that this is because there is not a sufficient interval allowing the first application to actually close before the code fires to close the next application.

I could probably do this somehow with a timer, but the technique is escaping me. I bet there is also another, possibly better, way to accomplish this.

Thanks in advance for the help.

 
I dunno if it would help, but you might try doevents
it might work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top