Close
Showing results 1 to 7 of 7

Hybrid View

  1. #1

    Default AHK script help (on the fly main change)

    Hello,

    I have been playing around with AHK scripts and i am trying to find a way to set the variables in my script.

    Basically i play two copies of wow windowed and i want to be able to press "C" and whichever window is active set that to variable "%chrMAIN%" and the other id is "%chrAlt%"

    In the end i want to be able to play windowed and alt tab between them and with a press of "C" change whichever one i am on to my main.



    I know how to make a toggle button but i would rather it detect which window i am currently looking at and set that variable to the main


    or can i do this without pressing c? like it always checks what window i am looking at??

  2. #2

    Default

    this is the best i can guess but there has to be a better cleaner way to do it

    ~c::
    KeyWait c
    IfWinActive, World of Warcraft
    {
    WinGet, wowid, List, World of Warcraft

    chrMAIN = %wowid1%
    chrAlt = %wowid2%
    If WinActive = %wowid1%
    chrMAIN = %wowid1%
    else

    chrMAIN = %wowid2%
    chrAlt = %wowid1%
    }


    i doubt the syntax will work with 2 things to do after the else and if winactive is the command i am looking for

  3. #3

    Default

    My next try, hopefully whenever i press "C" it will set the vars on the fly ill try it when i get home.

    c::
    KeyWait, c, D
    IfWinActive, World of Warcraft
    {


    ; Get both ID's variables
    WinGet, wowid, List, World of Warcraft
    winone = %wowid1%
    wintwo = %wowid2%


    ; Get current window a variable
    WinGet, active_id, ID, A
    active = %active_id%


    ; Make the active chrMAIN & not active chrAlt
    if %active% = %winone%
    chrMAIN = %winone%
    chrAlt = %wowid2%
    else
    chrMAIN = %wintwo%
    chrAlt = %winone%
    Return
    }

  4. #4

    Default

    why not do it ingame instead of writing some code where you just promote the toon to leader.. wouldn't that save a lot of hassle?

  5. #5

    Default

    so i have wow in 2 windows on 1 screen , i want to be able to change mains quickly for collecting quest's and such.

    what i have setup last night is this.

    shift + 1 : char1 recieves shift + 1, char2 recieves shift + 2

    shift + 2 : char1 recieves shift + 2, char2 recieves shift + 1

    so i have setup 2 sets of spell bars shift1 (1 to =) no macros and shift 2 (1 to = ) all assist macros and follow etc both bar sets are identicle on each character.



    Shift 1 on both characters is standard spells no macros or assist spells exactly like if i was only playing 1 character.

    But when i press shift + 1 on either character it sends shift + 2 to the other and all those spells have macros with "/assist otherplayername" in the first line.

    so now if i change to one char i press shift + 1 and keep playing like i am only on one character then if i change to the other i just press shift + 2 it changes the spell bars on both

  6. #6

    Default

    STILL WIP - not sure if this needs winactivate

    NumPad1::

    KeyWait, NumPad1, D

    IfWinActive, World of Warcraft

    {

    WinMaximize, ahk_id %wowid1%

    WinMinimize, ahk_id %wowid2%

    WinActivate, ahk_id %wowid1%

    ControlSend,,{shift down}{1 down}{1 up}{shift up}, ahk_id %wowid1%

    ControlSend,,{shift down}{2 down}{2 up}{shift up}, ahk_id %wowid2%

    Return

    }



    NumPad2::

    KeyWait, NumPad2, D

    IfWinActive, World of Warcraft

    {

    WinMinimize, ahk_id %wowid1%

    WinMaximize, ahk_id %wowid2%

    WinActivate, ahk_id %wowid2%

    ControlSend,,{shift down}{2 down}{2 up}{shift up}, ahk_id %wowid1%

    ControlSend,,{shift down}{1 down}{1 up}{shift up}, ahk_id %wowid2%

    Return

    }

  7. #7

    Default

    Check out [AutoHotKey] AutoHotKey DualBox Script and see if it helps...
    Realm: Vek'nilash Faction: Alliance

Similar Threads

  1. Need Script to change Keybinding (Interact Key)
    By Mikey in forum Macros and Addons
    Replies: 8
    Last Post: 05-01-2009, 02:35 PM
  2. Script to change keybinds
    By Coca Cola Injection in forum Macros and Addons
    Replies: 15
    Last Post: 02-23-2009, 01:47 PM
  3. Replies: 2
    Last Post: 07-14-2008, 10:53 AM
  4. Replies: 4
    Last Post: 06-22-2008, 07:38 AM
  5. Replies: 2
    Last Post: 05-26-2008, 03:07 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
  •