MasonMill Posted May 4, 2010 Posted May 4, 2010 Hey guys, I would like to attach another keystroke to a mouseclick, like when i click the mouse i would like it to be able to click say the s button. And want to be able to toggle in and out of doing so. Here is what i have so far, any suggestions? Thanks in advance! Global $Changed HotKeySet("{INSERT}", "ToggleChanged") While 1 Sleep(100) WEnd Func ToggleChanged() $Changed = NOT $Changed While $Changed If MouseClick("left") Then send("s") sleep(200) MouseClick("left") sleep(20) EndIf WEnd EndFunc
MasonMill Posted May 4, 2010 Author Posted May 4, 2010 This way just gets stuck in the while loop inside the ToggleChange loop and continues to press s and mouseclick. I just want it to do it once though.
jebus495 Posted May 4, 2010 Posted May 4, 2010 #Include <Misc.au3> While 1 Sleep(50) If _IsPressed(01) Then Send("S", 1) Sleep(500) WEnd Look up _IsPressed in the Help File.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now