toggle key?

If you have a question or need help, this is the place to be.
Post Reply
droopie
Posts: 1
Joined: Sat Oct 27, 2018 6:46 pm

toggle key?

Post by droopie » Mon Jan 14, 2019 5:12 pm

how can press a key as a toggle? i basically want to do a mouse movement every other press of a key (tab).
so when i press tab, it does a mouse movement but when i press tab again not do a mouse movement till the next press of tab.

User avatar
kgschlosser
Site Admin
Posts: 4424
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: toggle key?

Post by kgschlosser » Tue Jan 15, 2019 2:18 pm

The Enable and Disable action will do what you need it to do.


ok so this is how the setup should look


Code: Select all

Autostart
	enable action (enable macro1)
	disable action (disable macro2)

macro1
	tab event
	enable action (enable macro2)
	disable action (disable macro1)
macro2
	tab event
	enable action (enable macro1)
	disable action (disable macro2)
	mouse movement action
how this works is macro 1 will consume the first tab press. it will then enable macro2 so it can process the second tab press. because we do not macro1 to run on the second press we will disable it. when the second tab gets press we have it reset everything so macro1 will consume the 3rd tab press.. and so on and so forth.


the addition of the enable and disable actions in the Autostart group will ensure that everything gets reset when you start up EG. because if you press the tab key one time and then close EG it is going to save the enabled and disabled states as they are. we do not want EG to start up with you being able to press the tab key one time and have the mouse movement happen.
If you like the work I have been doing then feel free to Image

Post Reply