Jump to content

Recommended Posts

Posted

Hey im looking to rebind my wasd keys to arrow keys in order to play a game using my phone and chrom remote access. I tried using controlsend to send a arrow keys when i push wasd. Problem lies in that it sends both w (for example) and the up arrow key aswell as asd etc. Any ideas how to get around this?

Posted (edited)
_HotKey("w")
_HotKey("a")
_HotKey("s")
_HotKey("d")
_HotKey("x")
Func _HotKey($hotkey = "")
    Switch @HotKeyPressed

        Case "w"
            Send("{up}")
        Case "a"
            Send("{left}")
        Case "s"
            Send("{down}")
        Case "d"
            Send("{right}")
        Case "x"
            Exit 0 * MsgBox(64 + 262144, Default, "Exit", 1)
        Case Else
            If Not IsDeclared("hotkey") Then Return MsgBox(16 + 262144, Default, "No CASE statement defined for hotkey " & @HotKeyPressed)
            If HotKeySet($hotkey, "_Hotkey") = 0 Then Return MsgBox(16 + 262144, Default, "Hotkey " & $hotkey & " invalid or set by another application.")
    EndSwitch

EndFunc   ;==>_HotKey



While Sleep(100) ; here should be your application.
WEnd ; meanwhile, here is a dummy loop.

 

Edited by Exit

App: Au3toCmd              UDF: _SingleScript()                             

Posted (edited)

You just gave him code for a bot... Yet when someone actually needs help with keys for a legitimate application they get ignored?

<snip>

Edited by Melba23
Profanity removed
  • Moderators
Posted

Scripthen, as has been stated again and again and again - just report the post and move alone (done, now). The Mod team will deal both with the OP and anyone dumb enough to provide them what they're after.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

  • Moderators
Posted

Scripthen,

You have just earned yourself a short holiday from the forum - we do not want that kind of language here.

Exit;

Which part of " in order to play a game " in the OP was not clear? Last warning to you not to help those who are blatantly breaking the rules.

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

  Reveal hidden contents

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...