Close
Showing results 1 to 10 of 10
  1. #1

    Default Need help with shift+number key cloning to wow windows

    So I've been fiddling around a lot and finally stumbled on how to clone shift+ letters for wow (below)

    Code:
    WinGet, wowid, list, World of Warcraft
    
    +Q:: 
    ControlSend,, {Shift down}{Q down}{Q up}{Shift up}, ahk_id %wowid1%
    ControlSend,, {Shift down}{Q down}{Q up}{Shift up}, ahk_id %wowid2%
    Return
    However it seems to not be working with numbers, I think its because it thinks im pressing the shift character for the key (1 would be !, 2 would be @, 3 would be # etc...) so heres what I came up with, its an improvement because now my main window is working correctly but my offwindow is still trying to cast just the number as if the shift is not held down

    Code:
    WinGet, wowid, list, World of Warcraft
    
    +2:: 
    ControlSend,, {Shift down}{@ down}{@ up}{Shift up}, ahk_id %wowid1%
    ControlSend,, {Shift down}{@ down}{@ up}{Shift up}, ahk_id %wowid2%
    Return
    
    WinGet, wowid, list, World of Warcraft
    
    +3:: 
    ControlSend,, {Shift down}{# down}{# up}{Shift up}, ahk_id %wowid1%
    ControlSend,, {Shift down}{# down}{# up}{Shift up}, ahk_id %wowid2%
    Return
    
    WinGet, wowid, list, World of Warcraft
    
    +4:: 
    ControlSend,, {Shift down}{$ down}{$ up}{Shift up}, ahk_id %wowid1%
    ControlSend,, {Shift down}{$ down}{$ up}{Shift up}, ahk_id %wowid2%
    Return

  2. #2

    Default

    Seems like AHK can't hijack the hotkey properly. You can test it this way:
    Code:
    space::
    return
    Go in game and perss space to jump. If your character just jumped it means the hijacking of hotkeys is broken in that game. I got this problem in Skyrim myself and I haven't found a way to hijack the keys in games that don't support the hijacking.


    One way to solve your problem could be to lift the hotkeys UP before executing the clonepush:
    Code:
    +2::
    SEND {2 up}{Shift up}
    ControlSend,, {Shift down}{2}{Shift up}, ahk_id %wowid1%
    ControlSend,, {Shift down}{2}{Shift up}, ahk_id %wowid2%
    Return
    Last edited by aasi888 : 09-15-2012 at 10:46 AM

  3. #3

    Default

    Well it is working correctly, I mean I have every key on the keyboard bound for the most part including capitals and shift+ letters but I think the problem is coming from the fact that the number keys' shift item are different from the number itself (1 = ! 2 = @)

  4. #4

    Default

    EDIT: Script not working
    Could be the case.How about changing the settings for hotkey 2 as follows:

    Code:
    2::
    If GetKeyState("Shift","D")
    {
    ;     This gets triggered when shift button is down
    ;    INSERT CODE for hotkey: shift +2
    }
    If GetKeyState("Shift","U")
    {
    ;    This is triggered when you do not press shift button
    ;    INSERT CODE for hotkey: 2
    }
    return
    Not tested it so I don't know if works or not.
    Last edited by aasi888 : 09-17-2012 at 04:57 PM

  5. #5

    Default

    So you are saying that I should change it to when I press shift D the game recognizes it as me pressing shift 2? Or when I press shift 2 the game recognizes it as me pressing shift D?

  6. #6

    Default

    Answer to question:
    Looks like my script didnt work after all. And I was trying to make a too complicated example without reference to what I was aiming at.
    Check Autohotkey manual that comes with the program. I love to use it since it has a search function (I use the offline manual since it faster than online manual). Just search for Getkeystate and you will find out what it means.
    In my case it would execute the If statement only if the shift key was being pressed. Atleast that was my aim.


    Back to topic. Is it working at the moment or not? If it's not working then you might wanna try this:
    Code:
    +2::
    ControlSend,, {@}, ahk_id %wowid1%
    ControlSend,, {@}, ahk_id %wowid2%
    Return
    Last edited by aasi888 : 09-17-2012 at 05:03 PM

  7. #7

    Default

    The problem is when I go to keybind @ it just kebinds "Shift+2"

  8. #8

    Default

    You might wanna try Autohotkey forums. I don't know how you can do it.

  9. #9

    Default

    ~+2::
    ControlSend,,{Shift down}{2 down}{2 up}{Shift up}, ahk_id %wowid1%
    ControlSend,,{Shift down}{2 down}{2 up}{Shift up}, ahk_id %wowid2%
    return

    And for conditionals to getting key states you can simply use:

    ~a::
    If GetKeyState("a","P")
    {
    ControlSend,, {a down}, ahk_id %wowid2%
    }
    Else
    {
    ControlSend,, {a up}, ahk_id %wowid2%
    }
    return

    And nest shift and key required within the required blocks. D & U can still be used. P defines a physical key press. No need to define 2 blocks for up and down. Just test the key state. Longer way would have been to write If GetKeyState("a","P") = 1 .. which means of course true (key is being pressed). If key is not true, then just automatically do else.

    I am truly happy someone is trying to also learn AHK .. I do hope you are using AHK L however. Can be found as a link to their main site. Its the newest version. I have found AHK to be a bit slow on my machine. While AHK L is not. Its a wonderful version.

    I feel the reason most use other boxer tools. Is because scripting becomes daunting to them. Though it gives you a sense of accomplishment, when you roll your own code for your own use. And truthfully compared to all the other free applications around AHK / AHK L. Is far superior, and can do just as well and often times better. Just not everything is so easily found. Google is your friend.
    Last edited by Darkreign11 : 09-21-2012 at 01:44 PM

  10. #10

    Default

    AHK L. Never heard of that one. I guess I gotta have a look at it.

Posting Rules

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •