[Guide] PQR + AutoHotKey = Bind any ability to any key! menu

These ads disappear when you log in.

Results 1 to 10 of 10
  1. #1
    Christopher X's Avatar Corporal CoreCoins User
    Reputation
    14
    Join Date
    Jan 2007
    Posts
    34
    Thanks G/R
    0/0
    Trade Feedback
    2 (100%)

    [Guide] PQR + AutoHotKey = Bind any ability to any key!

    REAL HOTKEYS?
    We all know PQR is a fantastic program that has increased many player's quality of life while playing WoW. If you're like me however, you've been frustrated with the reality of only being allowed to manually cast abilities or use toggle functions with mod-keys. (Left Shift, Left Alt ect)

    Not to mention with mod-keys we're realistically limited to only five convenient keys during play (that's including mouse side buttons!). After that, we're having to reach for the right side of our keyboard, doing confusing modkey combos, or pausing/disabling our rotations to use in-game hotkeys. All the while our old, beloved, easy-to-reach hotkeys such as Q, E, R, 1-6, ect. are collecting dust.

    If you can relate to this, the following may be of great interest to you. I'm going to show you how we can use any key on the keyboard to do a toggle or manual cast when using PQR.

    What You Need:

    • AutoHotkey (AHK)
    • PQR, Keyboard and Mouse (HAHA, It's funny because you already have those things!)

    For those who don't know about AHK I'll give you a quick overview; AutoHotKey is a tool that allows you to manipulate any keystroke/mouse function into a wide variety of macros and functions. It's been popularly used by MMO gamers primarily for it's function of 'turbo'ing' a combination of keys (spamming a keystroke faster than humanly possible) so they don't have to do TAPA-TAPA-TAPA for hours on end. Here we'll be using it to turn ordinary keys like 1 into a modifier key, like left shift.

    AHK
    So once you've got AHK installed, open it and lets load the script we'll be using.
    Windows Task Bar > Icon Tray > Green Sqaure /w H > Right Click > Edit This Script

    Copy and paste this script over the default one:
    PHP Code:
    SetTitleMatchMode 3
    #IfWinActive, World of Warcraft

    ;----------------------------
    ;--  
    Left Shift         (1)-- <-(refrence number for PQR script)
    1:: ;<-- replace number with desired hotkey
      SendInput 
    {LShift down}
      
    KeyWait1  ;<-- replace number with same hotkey
      SendInput 
    {LShift up}
     ; 
    repeat process for all
    return
    ;----------------------------
    ;--  
    Left Control       (2)--
    2:: 
      
    SendInput {LCtrl down}
      
    KeyWait2
      SendInput 
    {LCtrl up}
    return
    ;----------------------------
    ;--  
    Left Alt           (3)--
    3::
      
    SendInput {LAlt down}
      
    KeyWait3
      SendInput 
    {LAlt up}
    return
    ;----------------------------
    ;--  
    Right Shift        (4)--
    4::
      
    SendInput {RShift down}
      
    KeyWait4
      SendInput 
    {RShift up}
    return
    ;----------------------------
    ;--  
    Right Control      (5)--
    5::
      
    SendInput {RCtrl down}
      
    KeyWait5
      SendInput 
    {RCtrl up}
    return
    ;----------------------------
    ;--  
    Right Alt          (6)--
    6::
      
    SendInput {RAlt down}
      
    KeyWait6
      SendInput 
    {RAlt up}
    return
    ;----------------------------
    ;--  
    RShift+RCtrl       (7)--
    7::
      
    SendInput {RShift down}
      
    SendInput {RCtrl down}
      
    KeyWait7
      SendInput 
    {RShift up}
      
    SendInput {RCtrl up}
    return
    ;----------------------------
    ;--  
    RShift+RAlt        (8)--
    8::
      
    SendInput {RShift down}
      
    SendInput {RAlt down}
      
    KeyWait8
      SendInput 
    {RShift up}
      
    SendInput {RAlt up}
    return
    ;----------------------------
    ;--  
    LShift+LCtrl       (9)--

    9::
      
    SendInput {LShift down}
      
    SendInput {LCtrl down}
      
    KeyWait9
      SendInput 
    {LShift up}
      
    SendInput {LCtrl up}
    return

    ;----------------------------
    ;--  
    LShift+LAlt        (10)-
    0::
      
    SendInput {LShift down}
      
    SendInput {LAlt down}
      
    KeyWait0
      SendInput 
    {LShift up}
      
    SendInput {LAlt up}
     return

    ;----------------------------
    --  
    LShift+RShift       (11)-
    -::
      
    SendInput {LShift down}
      
    SendInput {RShift down}
      
    KeyWait, -
      
    SendInput {LShift up}
      
    SendInput {RShift up}
    return
    ;----------------------------
    ;--  
    LCtrl+RCtrl        (12)-
    =::
      
    SendInput {LCtrl down}
      
    SendInput {RCtrl down}
      
    KeyWait, =
      
    SendInput {LCtrl up}
      
    SendInput {RCtrl up}
    return


    Chat Functions
    These keys temporally disable the script so you may type messages ingame unhindered.
    ~
    Enter:: 
    ~
    NumpadEnter:: 
      
    Suspend Permit
      Suspend
    return

    /::
      
    send /
      
    Suspend Permit
      Suspend
    return

    ~
    Esc::Suspend,off
    return
    ;-------------------------------------------------------------------------------------------;
    ;; 
    Mod-Keys List for Reference:
    ;; 
    SendInput {LShift down/up}
    ;; 
    SendInput {LCtrl down/up}
    ;; 
    SendInput {LAlt down/up}
    ;; 
    SendInput {RShift down/up}
    ;; 
    SendInput {RCtrl down/up}
    ;; 
    SendInput {RAlt down/up}
    ;; 
    SendInput {XButton1 down/up}   (Mouse SideBackward)
    ;; 
    SendInput {XButton2 down/up}   (Mosue SideForward
    Now save the text file, go back to the AHK icon and Right Click > Reload Script
    Confirm everything is set by loading up a profile that uses a modifier key by trying out 1-6.

    The default hotkeys for the modkeys are 1 through =, like your vanilla WoW, but you can change these to literally any key you desire by following the instructions located at the top of the AHK script.


    PQR
    Okay, at this point you could just use the AHK hotkeys for the mod-key your profile has available and leave it at that.

    If you want to add more abilities though, here's a PQR ability that you can add to any profile so you can manually cast more things not offered by your current profile.

    How to add this to a profile:
    PQR Main Window > Ability Editor > Class Containing The Profile > Profile Name > Click Any Ability Name

    Now !*rename*! the Ability Name (on the left panel under all the abilities) to --!Hotkeys (ensuring it'll be at the top of the list) and copy and paste this over the previous ability code:
    PHP Code:
    local cast CastSpellByName
    local 
    use = UseItemByName
    ----------------
    --
    Modkeys list--
    ----------------
    local fb IsMouseButtonDown(5)    --Mouse Side 'Foward' Button      fb
    local bb 
    IsMouseButtonDown(4)    --Mouse Sude 'Backward' Button    bb
    local ls 
    IsLeftShiftKeyDown()    --Left Shift                      ls
    local lc 
    IsLeftControlKeyDown()  --Left Control                    lc
    local la 
    IsLeftAltKeyDown()      --Left Alt                        la
    local rs 
    IsRightShiftKeyDown()   --Right Shift                     rs
    local rc 
    IsRightControlKeyDown() --Right Control                   rc
    local ra 
    IsRightAltKeyDown()     --Right Alt                       ra
    --Avoid Interference--
    local ls_only not lc and not la and not ra and not rc and not rs
    local lc_only 
    not ls and not la and not ra and not rc and not rs
    local la_only 
    not ls and not lc and not ra and not rc and not rs
    local ra_only 
    not rc and not rs and not lc and not ls and not la
    local rc_only 
    not rs and not ra and not lc and not ls and not la
    local rs_only 
    not rc and not ra and not lc and not ls and not la

    -----------------------------
    --
    Hotkeys--------------------
    -----------------------------
    --  
    Left Shift          (1)--
    if 
    ls and ls_only then
        cast
    ("spell")
    end
    -----------------------------
    --  
    Left Control        (2)--
    if 
    lc and lc_only then
        cast
    ("spell")
    end
    -----------------------------
    --  
    Left Alt            (3)--
    if 
    la and la_only then
        cast
    ("spell")
    end
    -----------------------------
    --  
    Right Shift         (4)--
    if 
    rs and rs_only then
        cast
    ("spell")
    end
    -----------------------------
    --  
    Right Control       (5)--
    if 
    rc and rc_only then
        cast
    ("spell")
    end
    -----------------------------
    --  
    Right Alt           (6)--
    if 
    ra and ra_only then
        cast
    ("spell")
    end
    -----------------------------
    --  
    RShift+RCtrl        (7)--
    if 
    rs and rc then
        cast
    ("spell")
    end
    -----------------------------
    --  
    RShift+RAlt         (8)--
    if 
    rs and ra then
        cast
    ("spell")
    end
    -----------------------------
    --  
    LShift+LCtrl        (9)--
    if 
    ls and lc then
        cast
    ("spell")
    end
    -----------------------------
    --  
    LShift+LAlt         (10)-
    if 
    ls and la then
        cast
    ("spell")
    end
    -----------------------------
    --  
    LShift+RShift       (11)-
    if 
    ls and rs then
        cast
    ("spell")
    end
    -----------------------------
    --  
    LCtrl+RCtrl         (12)-
    if 
    lc and rc then
        cast
    ("spell")
    end 
    The only thing you're requried to change here is spell to the name of the ability you wish to cast on hotkey. The reference number is the same in both the PQR and AHK code, making it easy to see what hotkey you're 'binding' your spell to.

    Now just go to the Rotation Editor via PQR Main Window, select the profile and put the ability you just created at the top of the ability list.

    Final Note
    Alright, so a few things to go over when you're using this PQR code with a profile that also uses mod keys for toggles/abilities.

    Lets say your profile is using Left Shift for CDs toggle on/off and you don't want to change it/disable it, simply leave the cast("spell") for LShift unchanged and change the default AHK hotkey for LShift to the key you would like to toggle CDs with (or alternatively, change it to a key you would never use and continue using LShift for this toggle). Easy!

    Now for the tricky part. If you're profile is using Left Shift (or any single mod-key) and you want to use one of the modkey combo hotkeys that contains Left Shift, like (9), anytime you hit that hotkey you're also causing that profile's Left Shift function to fire aswell. It does this because it doesn't consider the posibility of a player using a modkey combo.


    The work-around for this is one of the following;
    • Not using the modkey combo that contains a modkey single used by your profile (no edits required)
    • Disabling the ability that uses that single modkey (done through Rotation Editor via PQR)
    • Editing the profile ability that uses the modkey (profile edit required)


    Editing isn't difficult though, just find where the modkey is handled (usually under the ability it causes to go off) and add this near that top:
    Code:
    ----------------
    --Modkeys list--
    ----------------
    local fb = IsMouseButtonDown(5)    --Mouse Side 'Foward' Button      = fb
    local bb = IsMouseButtonDown(4)    --Mouse Sude 'Backward' Button    = bb
    local ls = IsLeftShiftKeyDown()    --Left Shift                      = ls
    local lc = IsLeftControlKeyDown()  --Left Control                    = lc
    local la = IsLeftAltKeyDown()      --Left Alt                        = la
    local rs = IsRightShiftKeyDown()   --Right Shift                     = rs
    local rc = IsRightControlKeyDown() --Right Control                   = rc
    local ra = IsRightAltKeyDown()     --Right Alt                       = ra
    --Avoid Interference--
    local ls_only = not lc and not la and not ra and not rc and not rs
    local lc_only = not ls and not la and not ra and not rc and not rs
    local la_only = not ls and not lc and not ra and not rc and not rs
    local ra_only = not rc and not rs and not lc and not ls and not la
    local rc_only = not rs and not ra and not lc and not ls and not la
    local rs_only = not rc and not ra and not lc and not ls and not la
    Now lets say you're trying to unchoke Left Shift, look for the code that contains IsLeftShiftKeyDown() or some kind of simplfication like L_Shift / ls ect. and add "and ls_only" after it and save the ability.

    Example:
    PHP Code:
    ##Lets say this is the code you have to change:

    if IsLeftAltKeyDown() then
             
    return true
    end

    ##it would become this:

    if IsLeftAltKeyDown() and la_only then
             
    return true
    end

    ##it might be more complicatied like this
    if not ToggleTimer then ToggleTimer GetTime() - 1.5 end

    if IsLeftControlKeyDown()  and GetTime() - ToggleTimer >= 1.5 then
        ToggleTimer 
    GetTime()

          if 
    AoE  then 

            AoE  
    false 
            
    print("AoE mode disabled!")

          else 
            
            
    AoE  true 
            
    print("AoE mode enabled!")

          
    end
    end

    ##but it's just as easy; remember after you see where the modkey is declared just put the corresponding key initials after it
    --and "corresponding key"_only-- 

    if 
    not ToggleTimer then ToggleTimer GetTime() - 1.5 end

    if IsLeftControlKeyDown() and lc_only
    -:Done!----------------------"^^^^^^" 
    ----------------------
    Ho-kay! That about wraps it up.

    I hope everything was clear and you now have a new tool in your PQR kit!


    Peace~

  2. #2
    CodeMyLife's Avatar Contributor CoreCoins User
    Reputation
    263
    Join Date
    Mar 2013
    Posts
    707
    Thanks G/R
    24/4
    Trade Feedback
    0 (0%)
    You know there are many ways to bind PQR abilities to your keys but the real prpblem here is that you dont use PQR built-in delay fonctions and you found a way to work with it. You should not have the spam issues unless something is wrong with your rotation!

    That being said, AutoHotkey is a nice tool too!!
    Soapbox Rotations Developer

  3. #3
    Christopher X's Avatar Corporal CoreCoins User
    Reputation
    14
    Join Date
    Jan 2007
    Posts
    34
    Thanks G/R
    0/0
    Trade Feedback
    2 (100%)
    Originally Posted by CodeMyLife View Post
    You know there are many ways to bind PQR abilities to your keys but the real prpblem here is that you dont use PQR built-in delay fonctions and you found a way to work with it. You should not have the spam issues unless something is wrong with your rotation!

    That being said, AutoHotkey is a nice tool too!!
    I have no idea what you're talking about! How do you bind a PQR ability to a non mod-key using just PQR and why would you use delay for a non-toggle?

  4. #4
    Rubim's Avatar Contributor CoreCoins User
    Reputation
    247
    Join Date
    Mar 2010
    Posts
    268
    Thanks G/R
    3/7
    Trade Feedback
    1 (100%)
    Originally Posted by Christopher X View Post
    I have no idea what you're talking about! How do you bind a PQR ability to a non mod-key using just PQR and why would you use delay for a non-toggle?
    You can send a console command from the WoW client.

    /Castfunction Shield Bash
    https://www.ownedcore.com/forums/world-of-warcraft/world-of-warcraft-bots-programs/wow-bot-maps-profiles/385569-pqr-death-knight-monk-tank-dps-profiles.html#post2582063

  5. #5
    Christopher X's Avatar Corporal CoreCoins User
    Reputation
    14
    Join Date
    Jan 2007
    Posts
    34
    Thanks G/R
    0/0
    Trade Feedback
    2 (100%)
    Originally Posted by Rubim View Post
    You can send a console command from the WoW client.

    /Castfunction Shield Bash
    Are you talking about Manual Cast Function in PQR? Unless there is an undocumented method of setting it to cast a specific ability in the given rotation, that would require setting up 3 individual rotations and limit you to three hot keys.

  6. #6
    CodeMyLife's Avatar Contributor CoreCoins User
    Reputation
    263
    Join Date
    Mar 2013
    Posts
    707
    Thanks G/R
    24/4
    Trade Feedback
    0 (0%)
    Nova functions are integrating /macros. In my profiles i code /aoe to switch a var and that macro can be placed anywhere on your bars!! You can also type in the command but placing a macro in your bars is definetly the best option.

    Im at work right now but later today i will share you this code.

    I dont remember what the code is exactly but it goes trought some getvarbool commands. The nova data lua file include it if i remember well
    Soapbox Rotations Developer

  7. #7
    CodeMyLife's Avatar Contributor CoreCoins User
    Reputation
    263
    Join Date
    Mar 2013
    Posts
    707
    Thanks G/R
    24/4
    Trade Feedback
    0 (0%)
    The delay part is a way to integrate manual abilities efficiently, not for toggles.
    Soapbox Rotations Developer

  8. #8
    CodeMyLife's Avatar Contributor CoreCoins User
    Reputation
    263
    Join Date
    Mar 2013
    Posts
    707
    Thanks G/R
    24/4
    Trade Feedback
    0 (0%)
    That is an exemple of code to use in-game /commands.

    Code:
    SLASH_AOE1 = "/aoe"
    function SlashCmdList.AOE(msg, editbox)
    	if not GetCVarBool("Nova_AoE") then
    		if not GetCVarBool("Nova_Recording") then
    			PQR_Event("PQR_Text","CodeMyLife - AoE",nil,"0698FF")
    		end
    		SetCVar("Nova_AoE", 1)
    	else
    		if not GetCVarBool("Nova_Recording") then
    			PQR_Event("PQR_Text","CodeMyLife - Single",nil,"FFFFFF")
    		end
    		SetCVar("Nova_AoE", 0)
    	end
    end
    I cannot explain how it works, actually found out this code in some Nova profiles and copied it in my rotations and im using it on many toggle in my prot pal rotation for stuff like activate/disactivate healing, aoe, consecration(some fights i turn it off so its easier to see the ground shits), Active Cooldowns and Active seals. You can add as many as you want and all you need to do is to map that macro ingame to any key you like with the keybinding panel ingame and by placing the macro in your actionbars.

    About the Spell delay, I meant that when you wanna use abilities manually it's easier to use delay code.

    Thats my hunter delays:

    Code:
    ------------
    -- Delays --
    ------------ 
    PQR_AddToSpellDelayList(781, 0, 1) -- Disengage
    PQR_AddToSpellDelayList(883, 0, 1) -- Call Pet #1
    PQR_AddToSpellDelayList(1978, 0, 1) -- Serpent Sting
    PQR_AddToSpellDelayList(2643, 0, 1) -- Multi-Shot
    PQR_AddToSpellDelayList(3044, 0, 1) -- Arcane Shot
    PQR_AddToSpellDelayList(3045, 0, 1) -- Rapid Fire
    PQR_AddToSpellDelayList(3674, 0, 1) -- Black Arrow
    PQR_AddToSpellDelayList(19263, 0, 1) -- Deterrence
    PQR_AddToSpellDelayList(19801, 0, 1) -- Tranquilizing Shot
    PQR_AddToSpellDelayList(20736, 0, 1) -- Distracting Shot
    PQR_AddToSpellDelayList(23989, 0, 1) -- Readiness
    PQR_AddToSpellDelayList(34477, 0, 1) -- Misdirection
    PQR_AddToSpellDelayList(34490, 0, 1) -- Silencing Shot
    PQR_AddToSpellDelayList(53271, 0, 1) -- Master's Call
    PQR_AddToSpellDelayList(53301, 0, 1) -- Explosive Shot
    PQR_AddToSpellDelayList(53351, 0, 1) -- Kill Shot
    PQR_AddToSpellDelayList(77767, 0, 1) -- Cobra Shot
    PQR_AddToSpellDelayList(82654, 0, 1) -- Widow Venom
    PQR_AddToSpellDelayList(82939, 0, 1) -- Explosive Trap
    PQR_AddToSpellDelayList(83242, 0, 1) -- Call Pet #2
    PQR_AddToSpellDelayList(83243, 0, 1) -- Call Pet #3
    PQR_AddToSpellDelayList(83244, 0, 1) -- Call Pet #4
    PQR_AddToSpellDelayList(83245, 0, 1) -- Call Pet #5
    PQR_AddToSpellDelayList(117050, 0, 1) -- Glaive Toss
    PQR_AddToSpellDelayList(121818, 0, 1) -- Stampede
    You put this right after init and now you can play more easily.

    Hope this helps
    Last edited by CodeMyLife; 05-03-2013 at 12:17 PM.

  9. #9
    CodeMyLife's Avatar Contributor CoreCoins User
    Reputation
    263
    Join Date
    Mar 2013
    Posts
    707
    Thanks G/R
    24/4
    Trade Feedback
    0 (0%)
    Laggy re-post
    Last edited by CodeMyLife; 05-03-2013 at 12:13 PM. Reason: laggy re-post

  10. #10
    Apocalypse59's Avatar Knight
    Reputation
    17
    Join Date
    Apr 2012
    Posts
    221
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Originally Posted by Rubim View Post
    You can send a console command from the WoW client.

    /Castfunction Shield Bash
    I can't get the /Castfunction command to work. Any ideas?

Similar Threads

  1. [Guide] Unbanning Yourself From ANY Program
    By Pwntzyou in forum Community Chat
    Replies: 108
    Last Post: 12-13-2008, 03:22 PM
  2. [Guide] How to make any Race be any Class and play it
    By Illidan1 in forum WoW EMU Guides & Tutorials
    Replies: 51
    Last Post: 03-19-2008, 08:32 PM
  3. [GUIDE] Start out with Any Items
    By Dryice in forum WoW EMU Guides & Tutorials
    Replies: 10
    Last Post: 01-22-2008, 01:35 AM
  4. [Guide] How to clear any quest in WoW easy
    By [ Prototype ] in forum World of Warcraft Guides
    Replies: 21
    Last Post: 11-21-2007, 03:33 PM
  5. [GUIDE] To Teleporting For Any Class With Out Regents
    By Comtap in forum WoW EMU Guides & Tutorials
    Replies: 7
    Last Post: 11-10-2007, 01:16 PM
All times are GMT -5. The time now is 03:52 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved. Digital Point modules: Sphinx-based search