koden Posted February 26, 2007 Report Share Posted February 26, 2007 My macro sometimes stops because of a error window. This error window appears diff. places in my program. When I click ok to the window the macro goes on. Is it possible to make a IF like this in start of macro? IF any error window appears while macro runs, then text type ok ? Quote Link to comment Share on other sites More sharing options...
Cory Posted February 26, 2007 Report Share Posted February 26, 2007 Does the error window have the same title every time? Quote Link to comment Share on other sites More sharing options...
koden Posted February 27, 2007 Author Report Share Posted February 27, 2007 YES..the title is the same Quote Link to comment Share on other sites More sharing options...
blopib Posted February 27, 2007 Report Share Posted February 27, 2007 Hi Koden Try this //Hit Enter when error window occurs If Window Title "" is running Text Type: <ENTER> End If If you don't know the exact name for the error window, wait for it to occur then open the macro and use select for the right window title. This offcourse just works if the ok button is "highlighted" if it's not perhaps you just can add up Text Type: <ARROW LEFT> before the Text Type: <ENTER> Quote Link to comment Share on other sites More sharing options...
Cory Posted February 27, 2007 Report Share Posted February 27, 2007 You could do a wait for control or window title but that will slow you down. I think I would do the same but I would use controls instead. Quote Link to comment Share on other sites More sharing options...
koden Posted February 27, 2007 Author Report Share Posted February 27, 2007 The problem is, that I don't know where in the macro run, that the error comes. I think it can be about 10 dif. places. Off course I can put the if command in 10 times....if there is no general command that can see any error while the macro runs... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.