punisa Posted September 18, 2008 Report Share Posted September 18, 2008 Hi, I have a macro set up to check for various files, see if they exist and so on. This is, of course, done in a loop as there are several actions. Now I need to check if a certain window has become active, but it seems I can not have two macro instances run at the same time, right? So, my first macro is busy doing its job and I need a second one that will monitor if a specific window has become active or not. How would I resolve this? Extra info: unfortunatly I can not add the monitoring action inside the first loop. Its kinda complicated to explain all the details, but it can not be done. Should I try and develop some sort of script that will monitoring for my specific window to become active? Maybe not with Macro Express, but some other tool? While we're at it, one more quick question: when working with window names I can add a partial name, but can not use wildcards, correct? That's too bad : ( Quote Link to comment Share on other sites More sharing options...
punisa Posted September 18, 2008 Author Report Share Posted September 18, 2008 Ok, seems I'm answering to myself again : )) Just like yesterday. My solution is using a simple Autoit script along with Macro Express. So far so good. I hope there won't be any complication if those two are running at the same time right? Scripts are small anyway. Quote Link to comment Share on other sites More sharing options...
rberq Posted September 18, 2008 Report Share Posted September 18, 2008 Glad we could help. Here's another possibility using only ME. Instead of looping in your first macro that checks for file existence, schedule it to run every second or two or whatever is appropriate. Then write a second macro that is activated by the appearance of the window you are watching for. (Just make sure you set Options | Preferences | Caching | Enable Window Activation Caching.) When the window appears this macro will be interleaved between scheduled executions of the first macro. This one can set and save a variable value to signal to the first macro that the window has appeared, if that's what you need. Or store an indicator in an environment variable which the first macro can access on its next execution. Quote Link to comment Share on other sites More sharing options...
punisa Posted September 18, 2008 Author Report Share Posted September 18, 2008 Glad we could help. Here's another possibility using only ME. Instead of looping in your first macro that checks for file existence, schedule it to run every second or two or whatever is appropriate. Then write a second macro that is activated by the appearance of the window you are watching for. (Just make sure you set Options | Preferences | Caching | Enable Window Activation Caching.) When the window appears this macro will be interleaved between scheduled executions of the first macro. This one can set and save a variable value to signal to the first macro that the window has appeared, if that's what you need. Or store an indicator in an environment variable which the first macro can access on its next execution. Thanks for input rberq ! Information will definitely come in handy. Unfortunately I can not do this (at least not for this project) as my macro process involves downloading from FTP (larger files) which stops macro until download finishes, and by so there is a great chance my window title will already disappear before downloading finishes. Yeah tricky stuff I know 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.