kwreames@aol.com Posted May 28, 2008 Report Share Posted May 28, 2008 I've made a simple macro where I press middle mouse and it executes keypresses of 7, then 8, then 9, then 0. What I would like to be able to do is press middle mouse, then have this sequence repeat itself until I press a key (middle mouse again preferably). Is this possible? Quote Link to comment Share on other sites More sharing options...
rberq Posted May 28, 2008 Report Share Posted May 28, 2008 Macro1 initiated by mouse click, toggles a variable between 0 and 1, runs Macro2 when toggling from 0 to 1. Macro2 checks variable toggled by Macro1. If variable=0, stop. If variable=1, do the keystrokes, run Macro2 (i.e. restart itself), stop. So the first mouse click will fire off the operation, which will continue "forever" with Macro2 running then immediately restarting itself. Second mouse click will trigger Macro1 to run again (between iterations of Macro2) and flip the variable back to 0, so on its next iteration Macro2 will terminate itself. I think the above will work. You may have to "save" the variable at the end of each macro, and "restore" it at the beginning of each, so that each macro will see what the other has done. 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.