Close
Page 1 of 2 1 2 LastLast
Showing results 1 to 10 of 12
  1. #1

    Default Auto Hotkey Dual Box Code

    I decided to mess around with AHK for a bit and see if it would work for me. I still haven’t decided if it is the way I want to go, but I have noticed there isn’t any really complete scripts out there that did what I wanted it to do so I played around with it for a few hours and came up with a script that I think is a good baseline for anyone and I thought I would share it with the board.

    My goal with this script was to be able to play either character as the main and send the alternate keys to the second window, while retaining all the original functionality I had with each toon when I was single boxing. Something about spamming unneeded keystrokes to both clients when those keystrokes weren’t needed just seemed a bit sloppy to me.

    Backspace switches, which window is main and which is secondary. F1- F12 keys are sent to whichever window is secondary allowing you to switch your main and secondary with the press of one button.

    If there is an interest in this script I will update this thread as I go.

    [code:1]
    ;; **********************
    ;; ******* GLOBALS ******
    ;; **********************

    I_Icon =
    SetTitleMatchMode, 3
    WinGet, wowid, list, World of Warcraft

    ;;************************************************
    ;;****** SWAP WINDOW FOCUS USING BACKSPACE *******
    ;;************************************************

    BS::
    KeyWait, BS, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    WinActivate, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    WinActivate, ahk_id %wowid1%
    }
    Return

    ;;********************************************
    ;;****** SEND FKEYS TO UNFOCUSED WOWID *******
    ;;********************************************

    ;****** F1 Key ******

    F1::
    KeyWait, F1, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F1}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F1}, ahk_id %wowid1%
    }
    Return

    ;****** F2 Key ******

    F2::
    KeyWait, F2, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F2}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F2}, ahk_id %wowid1%
    }
    Return

    ;****** F3 Key ******

    F3::
    KeyWait, F3, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F3}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F3}, ahk_id %wowid1%
    }
    Return

    ;****** F4 Key ******

    F4::
    KeyWait, F4, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F4}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F4}, ahk_id %wowid1%
    }
    Return

    ;****** F5 Key ******

    F5::
    KeyWait, F5, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F5}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F5}, ahk_id %wowid1%
    }
    Return

    ;****** F6 Key ******

    F6::
    KeyWait, F6, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F6}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F6}, ahk_id %wowid1%
    }
    Return

    ;****** F7 Key ******

    F7::
    KeyWait, F7, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F7}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F7}, ahk_id %wowid1%
    }
    Return

    ;****** F8 Key ******

    F8::
    KeyWait, F8, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F8}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F8}, ahk_id %wowid1%
    }
    Return

    ;****** F9 Key ******

    F9::
    KeyWait, F9, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F9}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F9}, ahk_id %wowid1%
    }
    Return

    ;****** F10 Key ******

    F10::
    KeyWait, F10, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F10}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F10}, ahk_id %wowid1%
    }
    Return

    ;****** F11 Key ******

    F11::
    KeyWait, F11, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F11}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F11}, ahk_id %wowid1%
    }
    Return

    ;****** F12 Key ******

    F12::
    KeyWait, F12, D
    WinGet, Active_Window, ID, A
    If Active_Window =%wowid1%
    {
    ControlSend,, {F12}, ahk_id %wowid2%
    }
    Else If Active_Window =%wowid2%
    {
    ControlSend,, {F12}, ahk_id %wowid1%
    }
    Return[/code:1]

  2. #2

    Default

    very nice I was always going to make a full script but just went the hardware route now. Hope to see you do more with this great start though and keep sharing I have posted my little script><

  3. #3

    Default

    I'm pretty sure I'm reiterating what you said, but I want to be sure...

    So wait, using this I could "control" one of my chars and then using F1-F12 control a second character, if the hotbar was set up correctly? Then use back space to change which character you're controlling (which window you're controlling rather..), then can use F1-F12 to control the other one?

  4. #4

    Default

    Quote Originally Posted by proxymatic
    I'm pretty sure I'm reiterating what you said, but I want to be sure...

    So wait, using this I could "control" one of my chars and then using F1-F12 control a second character, if the hotbar was set up correctly? Then use back space to change which character you're controlling (which window you're controlling rather..), then can use F1-F12 to control the other one?
    What he has done is when your active wow is up then F1-F12 key presses are going to go only to the second WoW unlike most scripts that send one key press to both wows. When he switches to the second wow so its active the F keys are only going to go to that first wow then. Did I help any? lol

  5. #5

    Default

    Yes, you guys got it,

    The concept I’m going for is if I am playing two toons A and B then I have the same set of primary and secondary commands for each, but each A and B only receives the commands I need them to. Example

    If im focused on A (by using backspace or clicking on it or simply using ALT+TAB)
    My normal keybinds work:
    Wasdfqe are my movement keybinds
    1,2,3,4,5,6,7,8,9,0,-,= are my 12 main combat bar keybinds
    f1-f12 do nothing on this toon, they send commands to keybinds on another bar on toon B

    If I am focused on B (by using backspace or clicking on it or simply using ALT+TAB)
    My normal keybinds work:
    Wasdfqe are my movement keybinds
    1,2,3,4,5,6,7,8,9,0,-,= are my 12 main combat bar keybinds
    f1-f12 do nothing on this toon, they send commands to keybinds on another bar on toon A

  6. #6

    Default

    This works great, thanks, I'm working on a variation of it to fit my needs. But my only problem is that I don't know how to send the input to both WoW windows, if one is active and one isn't.

    This is probably a really simple answer and I'm just overthinking it, but any help would be appreciated.

  7. #7

    Default

    That code is nice, but I have a question. How do i set up the global for EQ2?

    Is it possible?

  8. #8

    Default

    Quote Originally Posted by proxymatic
    This works great, thanks, I'm working on a variation of it to fit my needs. But my only problem is that I don't know how to send the input to both WoW windows, if one is active and one isn't.

    This is probably a really simple answer and I'm just overthinking it, but any help would be appreciated.
    Skip the "if"s.

    Like this (stolen from Ellay's thread on the topic):
    [code:1]~2::
    KeyWait 2
    IfWinActive, World of Warcraft
    {
    ControlSend,, 2, ahk_id %wowid1%
    ControlSend,, 2, ahk_id %wowid2%
    Return
    }[/code:1]

    Anyway I think I'll try to set this up for my G-keys.. anyone know if anything will happen if I have it hold down a couple of modifiers at the same time as hitting F-keys? I mean I know about alt+F4 but just wether ctrl or shift did something that might slow down my play.

  9. #9

    Default

    Yesterday night i read your code and was very inspired.

    Installed autokey and created 2 new toons to try it.I have a 22' wide monitor so i can keep two wow 800x600 windows on screen.This works really good for me.

    Only have 1 little very noobish question : to use F1-F12 keys i think you have to unbind those keys in both wow accounts right ? How do you unbind em without binding another key ?

    Thanks a lot

  10. #10
    Member Otlecs's Avatar
    Join Date
    May 2007
    Location
    EU-Aggramar, Alliance.
    Posts
    1367

    Default

    There's a button right there in the Key Binding UI, at the bottom. I'm working just now so can't check the exact wording, but it's pretty unambiguous once you spot it

Similar Threads

  1. Need help with auto hotkey
    By tankstorm in forum Software Tools
    Replies: 1
    Last Post: 11-07-2008, 12:50 AM
  2. Need a hotkey code set for hotkeynet.
    By dannyboy in forum New Multi-Boxers & Support
    Replies: 12
    Last Post: 09-08-2008, 05:55 PM
  3. Auto hotkey
    By darkkille267 in forum New Multi-Boxers & Support
    Replies: 2
    Last Post: 08-23-2008, 11:00 PM
  4. auto hotkey help with macros
    By kojak965 in forum New Multi-Boxers & Support
    Replies: 1
    Last Post: 06-16-2008, 09:27 AM
  5. Auto Hotkey Script?
    By mufar in forum General WoW Discussion
    Replies: 7
    Last Post: 07-09-2007, 10:50 PM

Posting Rules

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