sanddoctor Posted December 9, 2009 Share Posted December 9, 2009 Hello:) Would like some help how to set my mouse right as shift+w down when holding the right mouse down and shift+w up when releasing the right mouse. Thx Link to comment Share on other sites More sharing options...
BeBoP Posted December 9, 2009 Share Posted December 9, 2009 Check out _IsPressed(). Link to comment Share on other sites More sharing options...
sanddoctor Posted December 9, 2009 Author Share Posted December 9, 2009 Check out _IsPressed().I tried but it just need to be simple as I mentioned above right mouse down=shift+w down and right mouse up=shift+w up. No timer what so ever.#include <Misc.au3>$dll = DllOpen("user32.dll")global $autohammer = 0Func hammer_toggle() If $autohammer = 0 Then Send("{w down}") Send("{lshift down}") sleep(100) $autohammer = 1 ConsoleWrite("on") Else Send("{w Up}") send("{lshift Up}") sleep(100) $autohammer = 0 ConsoleWrite("off") EndIfEndFunc; IdleWhile 1 if _IsPressed("02", $dll) and _IsPressed("10", $dll) Then hammer_toggle();right mouse and shift Sleep(10)Wend Link to comment Share on other sites More sharing options...
Minikori Posted December 9, 2009 Share Posted December 9, 2009 You don't need a timer for _IsPressed()... Look more into the function. For those who are asking questions, look in the help file first. I'm tired of people asking stupid questions about how to do things when 10 seconds in the help file could solve their problem.[quote name='JRowe' date='24 January 2010 - 05:58 PM' timestamp='1264381100' post='766337'][quote name='beerman' date='24 January 2010 - 03:28 PM' timestamp='1264372082' post='766300']They already have a punishment system for abuse.[/quote]... and his his name is Valik.[/quote]www.minikori.com Link to comment Share on other sites More sharing options...
BeBoP Posted December 9, 2009 Share Posted December 9, 2009 (edited) This isn't pro code but it should do the job. Opt("OnExitFunc","ShiftUp") #include <Misc.au3> $dll = DllOpen("user32.dll") Func ShiftUp() Send("{w up}") Send("{lshift up}") ; some times shift may stay down if you close the script too soon EndFunc While 1 if _IsPressed("02", $dll) Then Send("{w down}") Send("{lshift down}") Else Send("{w up}") Send("{lshift up}") EndIf Sleep(10) Wend Edited December 9, 2009 by BeBoP Link to comment Share on other sites More sharing options...
sanddoctor Posted December 9, 2009 Author Share Posted December 9, 2009 (edited) This isn't pro code but it should do the job. Opt("OnExitFunc","ShiftUp") #include <Misc.au3> $dll = DllOpen("user32.dll") Func ShiftUp() Send("{w up}") Send("{lshift up}") ; some times shift may stay down if you close the script too soon EndFunc While 1 if _IsPressed("02", $dll) Then Send("{w down}") Send("{lshift down}") Else Send("{w up}") Send("{lshift up}") EndIf Sleep(10) Wend Omg Thx alot! But now I cant just press and hold w key down Edited December 9, 2009 by sanddoctor Link to comment Share on other sites More sharing options...
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