Register
Page 1 of 4 123 ... Last
Results 1 to 10 of 34
  1. #1

    Sending Keystrokes on Any Action

    EDIT: PLEASE VIEW MY FOLLOW-UP POST ON THE SECOND PAGE OF THIS THREAD BEFORE ATTEMPTING TO CREATE AN AUTOHOTKEY SCRIPT - IT MAY SAVE YOU FROM BEING BANNED. CHECKING FOR MOUSE MOVEMENT PERIODICALLY IS NOT A DIRECT AND IMMEDIATE ONE-TO-ONE RESULT OF A HUMAN ACTION.

    Before I starting this post, I'd like to say that this is in fact, legal, as each keystroke sent to WoW is the direct and immediate one-to-one result of a human action.

    I'm looking for a program or script (extra points if you use AutoHotkey) that can send a keystroke to WoW whenever I'm performing ANY action whatsoever on my computer, if WoW is in the background. For example, typing, clicking, moving the mouse, scrolling, whatever. What I'm NOT looking for is something that will continuously spam a key without me even being at the computer, as that is illegal.

    I'm trying to avoid getting a wrist injury, and after sitting down prospecting and DEing for 4 hours straight yesterday I'm totally fed up with this, as I have much better things to do with my time.

    Any help would be much appreciated.
    Last edited by Jenzali; September 13th, 2011 at 12:19 AM.

  2. #2
    Thanateros's Avatar
    Posts
    747
    Reputation
    33
    Tagged in
    188 Posts
    Add to this user's reputation
    Maybe hotkeynet could be a solution. But that strongly depends on what you're doing during Prospecting.

    HotKeyNet is a tool for dual / multiboxing which sends your keystrokes to different windows (which you gotta name). But since it only replicates keystrokes to specific windows (the ones you named in the script file), it depends on if you're doing sth different everytime or if you're for example doing programming stuff or writing a book in word.

    If you're writing sth in another program, you can duplicate any key (OMG! Where's THE ANY KEY!!). If you're watching a movie, you can write in the script that keys shall only be duplicated for your WoW-window, so VLC media Player (or anyone you use) doesn't receive the keystrokes.
    Milestones: 10.02.2011: 100k / 09.06.2011: 500k / 21.07.2011: 750k / 10.08.2011: Goldcap! / 28.03.2012: GBank at goldcap - 2 million fluid!
    ---------------------------
    That is not dead which can eternal lie.
    And with strange aeons even death may die

  3. #3
    Pliaksi's Avatar
    Posts
    173
    Reputation
    64
    Tagged in
    86 Posts
    Add to this user's reputation
    Well since it seems as "almost" legal, I will give you some tips about it (Autohotkey related):

    -You can intercept any key press with the "Hotkey" command and wildcards "*".
    -You will then need to send the keys to both the active window and the WoW window.
    -Send generally sends input only to the active window. You will need ControlSend to achieve what you want. Or alternatively you can activate the WoW window for a brief time while you are sending the keystrokes.
    -About the mouse movements, you will need either a timer or an endless loop with sleep, and then compare the initial mouse coordinates with the current ones.

    Hope this helps. Now go coding
    It's not a bug, it's a feature !

  4. #4
    I've got this so far:

    Code:
    #Persistent
    SetTimer,UserInput,30
    Return
    UserInput:
    If A_TimeIdlePhysical<50
       ControlSend,,=,World of Warcraft
    Return
    It works mostly fine - it's sending the keystroke on literally ANY action: mouse movement, typing, scrolling, clicking, etc.

    However, any time I use a modifier key it's ignoring it, making it impossible to use Shift to type capital letters when I'm working on my essay :P

    Are the modifier keys treated differently somehow? How can this problem be fixed?
    Last edited by Jenzali; September 8th, 2011 at 05:00 AM.

  5. #5
    Pliaksi's Avatar
    Posts
    173
    Reputation
    64
    Tagged in
    86 Posts
    Add to this user's reputation
    Well, technically that script is not listening for key presses at all. It is just evaluating each 30 ms if any physical action is taken. So there should be no way, that this is interfering with your Shift key. Does the problem go away when you close the script?
    It's not a bug, it's a feature !

  6. #6
    Nilaus's Avatar
    Posts
    586
    Reputation
    24
    Blog Entries
    6
    Tagged in
    288 Posts
    Add to this user's reputation
    @Jenzali shouldn't you be working on your lower case essay instead of figuring out how to prospect while writing scripts and forum posts

  7. #7
    Pliaksi's Avatar
    Posts
    173
    Reputation
    64
    Tagged in
    86 Posts
    Add to this user's reputation
    @Nilaus you should consider the possibility of his essay being on computer automation
    It's not a bug, it's a feature !

  8. #8
    I found a happy medium - it sends the keystroke when moving the mouse only. I didn't bother with typing.

    Code:
    #persistent
    coordmode, mouse, screen
    
    
    mousegetpos, sx, sy
    
    
    settimer, check, 1000
    return
    
    
    check:
    mousegetpos, cx, cy
    if (cx != sx or cy != sy)
    {
      ; mouse has moved, calculate by how much
      if (cx > (sx+2) or cx < (sx-2) or cy > (sy+2) or cy < (sy-2))
      {
        ControlSend,,=,World of Warcraft
        mousegetpos, sx, sy ; get new mouse position
      }  
    }      
    return
    I also sent in the following GM ticket:

    I am using a macro that sends a keystroke to WoW whenever I move my mouse, even if WoW is in the background.

    It requires me to be at the computer, and each keystroke is the direct and immediate result of a human action, me moving my mouse (one-to-one). If I am not at the computer, nothing is sent.

    I am wondering if this is legal or if it will get me banned.
    GM Response:

    Hey there, Jenzali!

    Thank you for waiting patiently for us to get back to you.

    If you are at the computer and doing this yourself, this may be fine. But however, please know that in battlegrounds this may not be allowed and you could get reported for AFK abuse.

    Please let us know if you need any other assistance with anything!

    Thanks for being an AWESOME WoW player since 2007!
    <3 Game Master Memilaez

  9. #9
    Snodeath's Avatar
    Posts
    135
    Reputation
    5
    Tagged in
    20 Posts
    Add to this user's reputation
    This is defiantly a +rep. Been looking for something like this for awhile.

  10. #10
    Pliaksi's Avatar
    Posts
    173
    Reputation
    64
    Tagged in
    86 Posts
    Add to this user's reputation
    @Jenzali - I am happy you found a solution, but just a little food for thought:

    1.You should consider that in both your examples you are cheking for movement in extremely short intervals. If we consider that one prospect + looting should take on average 3 seconds, the first script potentially sends 100 keystrokes in that period. While the second sends only 3, that is still 2 too many.
    2.You are sending the keystrokes on generally equal intervals - this overall screems "automation".
    3.Just thinking over the first script (in case someone decides to use it) it came to my attention, that you do not have #Install Keyboard/Mouse Hook in the code. What this generally means in short is that the ControlSend in the script will count as a physical input thus triggering the script even if no user action is done.

    Now why am I mantioning all this - even though you contacted a game master and got a response that this is acceptable, you have to consider how Blizzard would generally proceed to detect unwanted automation. I definately don't want to discuss ways to get around Warden, but spamming keystrokes on even intervals might get you into trouble.
    It's not a bug, it's a feature !