Jump to content

Holding shift+w on right mouse


Recommended Posts

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

Link to comment
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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...