wtawta Posted February 20, 2008 Report Share Posted February 20, 2008 Can't seem to wrap my head around making this work the way I want. Simple for some of you so I hope you can help? I want to run a macro every "X" occurances of an event. Let me try to explain in more detail and as simply as I can. Every "5" times a "Notepad" window is opened I want to run my macro. I would like to be able to change the number from 5 to whatever number I want of course. So I'm thinking that every time Notepad is opened, one macro is counting each event and logging it in a variable and everytime that veriable equals my number, in this case "5", another macro is triggered??? If I'm on the right track so far then I realize that my triggered macro will need to reset that veriable from 5 back to zero somehow in order to repeat the after another 5 instances. Hope this makes sense and you can help me out. Quote Link to comment Share on other sites More sharing options...
paul Posted February 20, 2008 Report Share Posted February 20, 2008 Well, you need only one macro. Each time the macro runs (whenever the Notepad window opens), it retrieves the previous value of the counter, increments it and stores it external to Macro Express (either in a file or in the registry). When the counter is divisble by 5, run the rest of the macro, otherwise return immediately. 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.