Sign in to follow this  
Followers 0
sanddoctor

Holding shift+w on right mouse

6 posts in this topic

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

Share this post


Link to post
Share on other sites



Check out _IsPressed().

Share this post


Link to post
Share on other sites

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 = 0

Func 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")

EndIf

EndFunc

; Idle

While 1

if _IsPressed("02", $dll) and _IsPressed("10", $dll) Then hammer_toggle();right mouse and shift

Sleep(10)

Wend

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by BeBoP

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by sanddoctor

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0