Close
Page 5 of 5 FirstFirst ... 3 4 5
Showing results 41 to 46 of 46
  1. #41

    Default

    I had a quick look at ISBoxer the other day, I couldn't figure out how to resize the windows when setting up, I'll have another go on the weekend. It looks pretty good, among other things it allows you to have a seperate config file for each character which is really good.

    I have finished my HotKeyNet window swapping script, it uses the following keys

    Pause - Toggles hot keys on or off, I use this when I dont want to broadcast key presses to all windows
    Ctrl Alt A - Toggle active window tracking
    Ctrl Alt L - Launch 5 instances of world of warcraft
    Ctrl Alt X - Make the active window the main window
    Ctrl Alt F1 - Make WoW1 the main window
    Ctrl Alt F2 - Make WoW2 the main window
    Ctrl Alt F3 - Make WoW3 the main window
    Ctrl Alt F4 - Make WoW4 the main window
    Ctrl Alt F5 - Make WoW5 the main window
    Ctrl Alt D Arrange the windows in the default layout
    Keys 1 - 0 and the minus key

    I use it with a screen resolution of 2560 x 1600 on windows 7

    Before pressing Ctrl Alt L I open up an instance of wow, change the graphics settings to low, windowed, a resolution of 720x576 and disable sound, then shut it down, otherwise my machine wouldn't be able to handle it when five of them start up.

    Is there a way to limit the fps of the smaller windows?

    Once the instances of wow have loaded there are two indicators in the bottom right of the screen to tell me whether hot keys are enabled and whether active window tracing is on, active window tracking is an operating system feature that causes the window with the mouse over it to recieve focus, this makes things much easier when switching windows.

    When the script loads hot keys are disabled by default and I press the Pause key to enable them.

    The default window layout is

    WoW5 - Top Left
    WoW4 - Bottom Left
    WoW3 - Top Middle
    WoW2 - Top Right
    WoW1 - Main

    I posted a screenshot a few days ago

    Here Is Part One

    Code:
    <Command LaunchAndRename>
       <SendPC local> 
          <Run "C:\Users\Public\Games\World of Warcraft\WoW.exe">
            <RenameTargetWin %2%>
    <Command SetWin1>
        <SetVar Win1 %1%>
        <TargetWin %1%>
            <SetWinPos 0 0>
            <SetWinSize 965 795>
            <UpdateWin>
    <Command SetWin2>
        <SetVar Win2 %1%>
        <TargetWin %1%>
            <SetWinPos 0 795>
            <SetWinSize 965 795>
            <UpdateWin>
    <Command SetWin3>
        <SetVar Win3 %1%>
        <TargetWin %1%>
            <SetWinPos 965 0>
            <SetWinSize 795 660>
            <UpdateWin>
    <Command SetWin4>
        <SetVar Win4 %1%>
        <TargetWin %1%>
            <SetWinPos 1760 0>
            <SetWinSize 795 660>
            <UpdateWin>
    <Command SetWin5>
        <SetVar Win5 %1%>
        <TargetWin %1%>
            <SetWinPos 965 660>
            <SetWinSize 1135 930>
            <UpdateWin>
    <Command DefaultWindowLayout>
        <SetWin1 WoW5>
        <SetWin2 WoW4>
        <SetWin3 WoW3>
        <SetWin4 WoW2>
        <SetWin5 WoW1>
    <Command Swap1And5>
        <SetWin1 %2%>
        <SetWin5 %1%>
    <Command Swap2And5>
        <SetWin2 %2%>
        <SetWin5 %1%>
    <Command Swap3And5>
        <SetWin3 %2%>
        <SetWin5 %1%>
    <Command Swap4And5>
        <SetWin4 %2%>
        <SetWin5 %1%>
    <Command AutoExec>
        <DoHotKey Hotkey NumLockOn Alt Ctrl Shift H>
        <DoHotKey Hotkey NumLockOn Alt Ctrl Shift A>
        <DoHotKey Hotkey NumLockOn Alt Ctrl Shift T>
        <SetActiveWindowTracking Off> 
        <SetVar ActOff true>
    <Hotkey NumLockOn Alt Ctrl Shift H>
        <If WinDoesNotExist HKN>
            <CreatePanel HKN 2500 1535 30 30>
            <TargetWin HKN>
            <CreateColoredButton ON 0 0 30 30 0x00FF00 0x0F0F0F ???>
            <AddButtonToPanel ON HKN>
            <SetButtonText ON HKN>
            <TargetWin HKN>      
            <AlwaysOnTop on>
            <RemoveWinFrame>
            <UpdateWin>
        <EndIf>
        <SetButtonColors ON 0xfF0000 0xffFFff >
        <SetButtonText ON off>
    <Hotkey NumLockOn Alt Ctrl Shift A>
        <If WinDoesNotExist AWT>
            <CreatePanel AWT 2400 1535 30 30>
            <TargetWin AWT>
            <CreateColoredButton ACT 0 0 30 30 0x0000FF 0xFFFFFF ???>
            <AddButtonToPanel ACT AWT>
            <SetButtonText ACT AWT>
            <TargetWin AWT>      
            <AlwaysOnTop on>
            <RemoveWinFrame>
            <UpdateWin>
        <endif>
        <SetButtonColors ACT 0xfF0000 0xffFFff >
        <SetButtonText ACT off>
    Last edited by PineBeach : 07-20-2010 at 09:58 PM

  2. #42

    Default

    Part Two

    Code:
    <Hotkey Alt Ctrl Shift Oem2>
        <If Win5 Is WoW4>
            <Swap4And5 WoW1 WoW4>
        <Else If Win5 Is WoW5>
            <Swap4And5 WoW1 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift Period>
        <If Win5 Is WoW2>
            <Swap4And5 WoW1 WoW2>
        <Else If Win5 Is WoW3>
            <Swap4And5 WoW1 WoW3>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift Oem2>
        <EndIf>
    <Hotkey Alt Ctrl Shift Comma>
        <If Win5 Is WoW4>
            <Swap3And5 WoW1 WoW4>
        <Else If Win5 Is WoW5>
            <Swap3And5 WoW1 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift M>
        <If Win5 Is WoW2>
            <Swap3And5 WoW1 WoW2>
        <Else If Win5 Is WoW3>
            <Swap3And5 WoW1 WoW3>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift Comma>
        <EndIf>
    <Hotkey Alt Ctrl Shift N>
        <If Win3 Is WoW1>
            <DoHotkey Hotkey Alt Ctrl Shift M>
        <Else If Win4 Is WoW1>
            <DoHotkey Hotkey Alt Ctrl Shift Period>    
        <EndIf>
    <Hotkey Alt Ctrl Shift B>
        <If Win5 Is WoW4>
            <Swap2And5 WoW1 WoW4>
        <Else If Win5 Is WoW5>
            <Swap2And5 WoW1 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift V>
        <If Win5 Is WoW2>
            <Swap2And5 WoW1 WoW2>
        <Else If Win5 Is WoW3>
            <Swap2And5 WoW1 WoW3>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift B>
        <EndIf>
    <Hotkey Alt Ctrl Shift C>
        <If Win2 Is WoW1>
            <DoHotkey Hotkey Alt Ctrl Shift V>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift N>
        <EndIf>
    <Hotkey Alt Ctrl Shift X>
        <If Win5 Is WoW4>
            <Swap1And5 WoW1 WoW4>
        <Else If Win5 Is WoW5>
            <Swap1And5 WoW1 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift Z>
        <If Win5 Is WoW2>
            <Swap1And5 WoW1 WoW2>
        <Else If Win5 Is WoW3>
            <Swap1And5 WoW1 WoW1>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift X>
        <EndIf>
    <Hotkey Alt Ctrl Shift Oem5; Alt Ctrl F1>
        <If Win1 Is WoW1>
            <DoHotkey Hotkey Alt Ctrl Shift Z>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift C>
        <EndIf>
    <Hotkey Alt Ctrl Shift Oem3>
        <If Win5 Is WoW4>
            <Swap4And5 WoW2 WoW4>
        <Else If Win5 Is WoW5>
            <Swap4And5 WoW2 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift Oem1>
        <If Win5 Is WoW1>
            <Swap4And5 WoW2 WoW1>
        <Else If Win5 Is WoW3>
            <Swap4And5 WoW2 WoW3>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift Oem3>
        <EndIf>
    <Hotkey Alt Ctrl Shift L>
        <If Win5 Is WoW4>
            <Swap3And5 WoW2 WoW4>
        <Else If Win5 Is WoW5>
            <Swap3And5 WoW2 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift K>
        <If Win5 Is WoW1>
            <Swap3And5 WoW2 WoW1>
        <Else If Win5 Is WoW3>
            <Swap3And5 WoW2 WoW3>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift L>
        <EndIf>
    <Hotkey Alt Ctrl Shift J>
        <If Win3 Is WoW2>
            <DoHotkey Hotkey Alt Ctrl Shift K>
        <Else If Win4 Is WoW2>
            <DoHotkey Hotkey Alt Ctrl Shift Oem1>    
        <EndIf>
    <Hotkey Alt Ctrl Shift H>
        <If Win5 Is WoW4>
            <Swap2And5 WoW2 WoW4>
        <Else If Win5 Is WoW5>
            <Swap2And5 WoW2 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift G>
        <If Win5 Is WoW1>
            <Swap2And5 WoW2 WoW1>
        <Else If Win5 Is WoW3>
            <Swap2And5 WoW2 WoW3>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift H>
        <EndIf>
    <Hotkey Alt Ctrl Shift F>
        <If Win2 Is WoW2>
            <DoHotkey Hotkey Alt Ctrl Shift G>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift J>
        <EndIf>
    <Hotkey Alt Ctrl Shift D>
        <If Win5 Is WoW4>
            <Swap1And5 WoW2 WoW4>
        <Else If Win5 Is WoW5>
            <Swap1And5 WoW2 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift S>
        <If Win5 Is WoW1>
            <Swap1And5 WoW2 WoW1>
        <Else If Win5 Is WoW3>
            <Swap1And5 WoW2 WoW3>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift D>
        <EndIf>
    <Hotkey Alt Ctrl Shift A; Alt Ctrl F2>
        <If Win1 Is WoW2>
            <DoHotkey Hotkey Alt Ctrl Shift S>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift F>
        <EndIf>
    <Hotkey Alt Ctrl Shift Oem4>
        <If Win5 Is WoW4>
            <Swap4And5 WoW3 WoW4>
        <Else If Win5 Is WoW5>
            <Swap4And5 WoW3 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift P>
        <If Win5 Is WoW1>
            <Swap4And5 WoW3 WoW1>
        <Else If Win5 Is WoW2>
            <Swap4And5 WoW3 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift Oem4>
        <EndIf>
    <Hotkey Alt Ctrl Shift O>
        <If Win5 Is WoW4>
            <Swap3And5 WoW3 WoW4>
        <Else If Win5 Is WoW5>
            <Swap3And5 WoW3 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift I>
        <If Win5 Is WoW1>
            <Swap3And5 WoW3 WoW1>
        <Else If Win5 Is WoW2>
            <Swap3And5 WoW3 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift O>
        <EndIf>
    <Hotkey Alt Ctrl Shift U>
        <If Win3 Is WoW3>
            <DoHotkey Hotkey Alt Ctrl Shift I>
        <Else If Win4 Is WoW3>
            <DoHotkey Hotkey Alt Ctrl Shift P>    
        <EndIf>
    <Hotkey Alt Ctrl Shift Y>
        <If Win5 Is WoW4>
            <Swap2And5 WoW3 WoW4>
        <Else If Win5 Is WoW5>
            <Swap2And5 WoW3 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift T>
        <If Win5 Is WoW1>
            <Swap2And5 WoW3 WoW1>
        <Else If Win5 Is WoW2>
            <Swap2And5 WoW3 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift Y>
        <EndIf>
    <Hotkey Alt Ctrl Shift R>
        <If Win2 Is WoW3>
            <DoHotkey Hotkey Alt Ctrl Shift T>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift U>
        <EndIf>
    <Hotkey Alt Ctrl Shift E>
        <If Win5 Is WoW4>
            <Swap1And5 WoW3 WoW4>
        <Else If Win5 Is WoW5>
            <Swap1And5 WoW3 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift W>
        <If Win5 Is WoW1>
            <Swap1And5 WoW3 WoW1>
        <Else If Win5 Is WoW2>
            <Swap1And5 WoW3 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift E>
        <EndIf>
    <Hotkey Alt Ctrl Shift Q; Alt Ctrl F3>
        <If Win1 Is WoW3>
            <DoHotkey Hotkey Alt Ctrl Shift W>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift R>
        <EndIf>
    <Hotkey Alt Ctrl Shift plus>
        <If Win5 Is WoW3>
            <Swap4And5 WoW4 WoW3>
        <Else If Win5 Is WoW5>
            <Swap4And5 WoW4 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift minus>
        <If Win5 Is WoW1>
            <Swap4And5 WoW4 WoW1>
        <Else If Win5 Is WoW2>
            <Swap4And5 WoW4 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift plus>
        <EndIf>
    <Hotkey Alt Ctrl Shift 0>
        <If Win5 Is WoW3>
            <Swap3And5 WoW4 WoW3>
        <Else If Win5 Is WoW5>
            <Swap3And5 WoW4 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift 9>
        <If Win5 Is WoW1>
            <Swap3And5 WoW4 WoW1>
        <Else If Win5 Is WoW2>
            <Swap3And5 WoW4 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift 0>
        <EndIf>
    <Hotkey Alt Ctrl Shift 8>
        <If Win5 Is WoW3>
            <Swap2And5 WoW4 WoW3>
        <Else If Win5 Is WoW5>
            <Swap2And5 WoW4 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift 7>
        <If Win5 Is WoW3>
            <Swap4And5 WoW5 WoW3>
        <Else If Win5 Is WoW4>
            <Swap4And5 WoW5 WoW4>
        <EndIf>
    <Hotkey Alt Ctrl Shift 6>
        <If Win5 Is WoW1>
            <Swap4And5 WoW5 WoW1>
        <Else If Win5 Is WoW2>
            <Swap4And5 WoW5 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift 7>
        <EndIf>
    <Hotkey Alt Ctrl Shift 5>
        <If Win5 Is WoW3>
            <Swap3And5 WoW5 WoW3>
        <Else If Win5 Is WoW4>
            <Swap3And5 WoW5 WoW4>
        <EndIf>
    <Hotkey Alt Ctrl Shift 4>
        <If Win5 Is WoW1>
            <Swap3And5 WoW5 WoW1>
        <Else If Win5 Is WoW2>
            <Swap3And5 WoW5 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift 5>
        <EndIf>
    <Hotkey Alt Ctrl Shift 3>
        <If Win3 Is WoW4>
            <DoHotkey Hotkey Alt Ctrl Shift 9>
        <Else If Win4 Is WoW4>
            <DoHotkey Hotkey Alt Ctrl Shift minus>
        <EndIf>
    <Hotkey Alt Ctrl Shift 2>
        <If Win5 Is WoW1>
            <Swap2And5 WoW4 WoW1>
        <Else If Win5 Is WoW2>
            <Swap2And5 WoW4 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift 8>
        <EndIf>
    <Hotkey Alt Ctrl Shift 1>
        <If Win5 Is WoW3>
            <Swap1And5 WoW4 WoW3>
        <Else If Win5 Is WoW5>
            <Swap1And5 WoW4 WoW5>
        <EndIf>
    <Hotkey Alt Ctrl Shift F12>
        <If Win2 Is WoW4>
            <DoHotkey Hotkey Alt Ctrl Shift 2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift 3>
        <EndIf>
    <Hotkey Alt Ctrl Shift F11>
        <If Win5 Is WoW1>
            <Swap1And5 WoW4 WoW1>
        <Else If Win5 Is WoW2>
            <Swap1And5 WoW4 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift 1>
        <EndIf>
    <Hotkey Alt Ctrl Shift F10; Alt Ctrl F4>
        <If Win1 Is WoW4>
            <DoHotkey Hotkey Alt Ctrl Shift F11>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift F12>
        <EndIf>
    <Hotkey Alt Ctrl Shift F9; Alt Ctrl F5>
        <If Win1 Is WoW5>
            <DoHotkey Hotkey Alt Ctrl Shift F1>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift F3>
        <EndIf>
    <Hotkey Alt Ctrl Shift F8>
        <If Win5 Is WoW3>
            <Swap2And5 WoW5 WoW3>
        <Else If Win5 Is WoW4>
            <Swap2And5 WoW5 WoW4>
        <EndIf>
    <Hotkey Alt Ctrl Shift F7>
        <If Win5 Is WoW1>
            <Swap2And5 WoW5 WoW1>
        <Else If Win5 Is WoW2>
            <Swap2And5 WoW5 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift F8>
        <EndIf>
    <Hotkey Alt Ctrl Shift F6>
        <If MouseIsOverWindow WoW1>
            <DoHotkey Hotkey Alt Ctrl Shift Oem5>
        <EndIf>
    <Hotkey Alt Ctrl Shift F5>
        <If MouseIsOverWindow WoW3>
            <DoHotkey Hotkey Alt Ctrl Shift Q>
        <Else If MouseIsOverWindow WoW2>
            <DoHotkey Hotkey Alt Ctrl Shift A>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift F6>
        <EndIf>
    <Hotkey Alt Ctrl Shift F4>
        <If Win3 Is WoW5>
            <DoHotkey Hotkey Alt Ctrl Shift 4>
        <Else If Win4 Is WoW5>
            <DoHotkey Hotkey Alt Ctrl Shift 6>    
        <EndIf>
    <Hotkey Alt Ctrl Shift F3>
        <If Win2 Is WoW5>
            <DoHotkey Hotkey Alt Ctrl Shift F7>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift F4>
        <EndIf>
    <Hotkey Alt Ctrl Shift F2>
        <If Win5 Is WoW3>
            <Swap1And5 WoW5 WoW3>
        <Else If Win5 Is WoW4>
            <Swap1And5 WoW5 WoW4>
        <EndIf>
    <Hotkey Alt Ctrl Shift F1>
        <If Win5 Is WoW1>
            <Swap1And5 WoW5 WoW1>
        <Else If Win5 Is WoW2>
            <Swap1And5 WoW5 WoW2>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift F2>
        <EndIf>

  3. #43

    Default

    Part Three

    Code:
    <Hotkey NumLockOn Alt Ctrl Shift T>
        <If HotkeysAreOn>
            <TurnHotkeysOff>
        <EndIf>
     
    <Hotkey Alt Ctrl X>
        <DisplayVars>
        <If MouseIsOverWindow WoW5>
            // make WoW5 the main window
            <DoHotkey Hotkey Alt Ctrl Shift F9>
        <Else If MouseIsOverWindow WoW4>
            // make WoW4 the main window
            <DoHotkey Hotkey Alt Ctrl Shift F10>
        <Else>
            //make WoW3, WoW2 or WoW1 the main window
            <DoHotkey Hotkey Alt Ctrl Shift F5>
        <EndIf>
    <Label w1 Local SendWinM WoW1>
    <Label w2 Local SendWinM WoW2>
    <Label w3 Local SendWinM WoW3>
    <Label w4 Local SendWinM WoW4>
    <Label w5 Local SendWinM WoW5>
    <Hotkey 0-9, Minus>
    <SendLabel w1, w2, w3, w4, w5>
    <Key %Trigger%> 
    <Hotkey Alt Ctrl L>
        <SetTaskbarAutoHide On>
        <LaunchAndRename Local WoW5>
        <LaunchAndRename Local WoW4>
        <LaunchAndRename Local WoW3>
        <LaunchAndRename Local WoW2>
        <LaunchAndRename Local WoW1>
        <DefaultWindowLayout>
    <Hotkey pause>
        <sendpc local>
        <If HotkeysAreOff>
           <TurnHotkeysOn>
           <SetButtonColors ON 0x00FF00 0x0F0F0F>
           <SetButtonText ON HKN>
        <Else>
           <TurnHotkeysOff>
           <SetButtonColors ON 0xfF0000 0xffFFff >
           <SetButtonText ON off>
        <EndIf>
    <Hotkey Alt Ctrl A>
        <Toggle>
            <sendpc local>
            <SetButtonColors ACT 0x00FF00 0x0F0F0F>
            <SetButtonText ACT AWT>
            <SetActiveWindowTrackingDelay 0>
            <SetActiveWindowTracking On> 
        <Toggle>
            <sendpc local>
            <SetButtonColors ACT 0xfF0000 0xffFFff >
            <SetButtonText ACT off>
            <SetActiveWindowTracking Off> 
    <Hotkey Alt Ctrl D>
        <SetVar Win1 WoW5>
        <SetVar Win2 WoW4>
        <SetVar Win3 WoW3>
        <SetVar Win4 WoW2>
        <SetVar Win5 WoW1>
        <DefaultWindowLayout>
    You may notice that it's rather long and convoluted, this is because of a limitation in HotKeyNet that prevents nesting of If statements within each other or user defined commands.

  4. #44

    Thumbs up

    Quote Originally Posted by Owltoid View Post
    I like this thread beause:

    1.) The OP is willing to do some legwork and isn't asking for everything under the sun
    2.) The OP isn't a braggart or saying he's the greatest MB in the world - just trying to learn
    3.) The OP is listening to others' advice and we aren't wasting our time
    +1

    Love reading this thread, I started with dual-comp, Synergy and follow myself. That left me feeling unfulfilled. Great to see OP being persistent and inventive a, and most of all doing great leg work.

  5. #45

    Default

    I have put the complete window swapping script with comments onto pastebin
    http://pastebin.com/raw.php?i=UEiwqSDs

    It works pretty well for me. So far I haven't used it as much as I thought I would.

  6. #46

    Default

    I was reading this today and I discovered the ApplyTemplate command, I've refactored my Window swaping script to use it

    Code:
    <Command LaunchAndRename>
       <SendPC local> 
          <Run "C:\Users\Public\Games\World of Warcraft\WoW.exe">
            <RenameTargetWin %1%>
    <Template SetWin>
        <Command SetWin%1%>
            <SetVar Win%1% %2%>
            <TargetWin %2%>
                <SetWinPos %3% %4%>
                <SetWinSize %5% %6%>
                <UpdateWin>
    <EndTemplate>
    <ApplyTemplate SetWin 1 "%1%" "0" "0" "965" "795">
    <ApplyTemplate SetWin 2 "%1%" "0" "795" "965" "795">
    <ApplyTemplate SetWin 3 "%1%" "965" "0" "795" "660">
    <ApplyTemplate SetWin 4 "%1%" "1760" "0" "795" "660">
    <ApplyTemplate SetWin 5 "%1%" "965" "660" "1135" "930">
    <Command DefaultWindowLayout>
        <SetWin1 WoW5>
        <SetWin2 WoW4>
        <SetWin3 WoW3>
        <SetWin4 WoW2>
        <SetWin5 WoW1>
    <Template Swap>
        <Command Swap%1%And%2%>
            <SetWin%1% %3%>
            <SetWin%2% %4%>
    <EndTemplate>
    <ApplyTemplate Swap 1 5 "%2%" "%1%">
    <ApplyTemplate Swap 2 5 "%2%" "%1%">
    <ApplyTemplate Swap 3 5 "%2%" "%1%">
    <ApplyTemplate Swap 4 5 "%2%" "%1%">
    <Command AutoExec>
        // Initialise the HKN indicator
        <DoHotKey Hotkey NumLockOn Alt Ctrl Shift H>
        // Initialise the AWT indicator
        <DoHotKey Hotkey NumLockOn Alt Ctrl Shift A>
        // turn hotkeys off
        <DoHotKey Hotkey NumLockOn Alt Ctrl Shift T>
        <SetActiveWindowTracking Off> 
        <SetVar ActOff true>
        <DefaultWindowLayout>
    <Hotkey NumLockOn Alt Ctrl Shift H>
        <If WinDoesNotExist HKN>
            <CreatePanel HKN 2500 1535 30 30>
            <TargetWin HKN>
            <CreateColoredButton ON 0 0 30 30 0x00FF00 0x0F0F0F ???>
            <AddButtonToPanel ON HKN>
            <SetButtonText ON HKN>
            <TargetWin HKN>      
            <AlwaysOnTop on>
            <RemoveWinFrame>
            <UpdateWin>
        <EndIf>
        <SetButtonColors ON 0xfF0000 0xffFFff >
        <SetButtonText ON off>
    <Hotkey NumLockOn Alt Ctrl Shift A>
        <If WinDoesNotExist AWT>
            <CreatePanel AWT 2400 1535 30 30>
            <TargetWin AWT>
            <CreateColoredButton ACT 0 0 30 30 0x0000FF 0xFFFFFF ???>
            <AddButtonToPanel ACT AWT>
            <SetButtonText ACT AWT>
            <TargetWin AWT>      
            <AlwaysOnTop on>
            <RemoveWinFrame>
            <UpdateWin>
        <endif>
        <SetButtonColors ACT 0xfF0000 0xffFFff >
        <SetButtonText ACT off>
    <Hotkey NumLockOn Alt Ctrl Shift T>
        <If HotkeysAreOn>
            <TurnHotkeysOff>
        <EndIf>
    <Template Conditional1>
        <Hotkey Alt Ctrl Shift %1%>
            <If Win5 Is WoW%2%>
                <Swap%3%And5 WoW%4% WoW%2%>
            <Else If Win5 Is WoW%5%>
                <Swap%3%And5 WoW%4% WoW%5%>
            <EndIf>
    <EndTemplate>
    <Template Conditional2>
        <Hotkey Alt Ctrl Shift %1%>
            <If Win5 Is WoW%2%>
                <Swap%3%And5 WoW%4% WoW%2%>
            <Else If Win5 Is WoW%5%>
                <Swap%3%And5 WoW%4% WoW%5%>
            <Else>
                <DoHotkey Hotkey Alt Ctrl Shift %6%>
            <EndIf>
    <EndTemplate>
    <Template Conditional3>
        <Hotkey Alt Ctrl Shift %1%>
            <If Win3 Is WoW%2%>
                <DoHotkey Hotkey Alt Ctrl Shift %3%>
            <Else If Win4 Is WoW%2%>
                <DoHotkey Hotkey Alt Ctrl Shift %4%>    
            <EndIf>
    <EndTemplate>
    <Template Conditional4>
        <Hotkey Alt Ctrl Shift %1%>
            <If Win%2% Is WoW%3%>
                <DoHotkey Hotkey Alt Ctrl Shift %4%>
            <Else>
                <DoHotkey Hotkey Alt Ctrl Shift %5%>
            <EndIf>
    <EndTemplate>
    <ApplyTemplate Conditional1 Oem2 4 4 1 5>
    <ApplyTemplate Conditional2 Period 2 4 1 3 Oem2>
    <ApplyTemplate Conditional1 Comma 4 3 1 5>
    <ApplyTemplate Conditional2 M 2 3 1 3 Comma>
    <ApplyTemplate Conditional3 N 1 M Period>
    <ApplyTemplate Conditional1 B 4 2 1 5>
    <ApplyTemplate Conditional2 V 2 2 1 3 B>
    <ApplyTemplate Conditional4 C 2 1 V N>
    <ApplyTemplate Conditional1 X 4 1 1 5>
    <ApplyTemplate Conditional2 Z 2 1 1 3 X>
    <ApplyTemplate Conditional4 "Oem5; Alt Ctrl F1" 1 1 Z C>
    <ApplyTemplate Conditional1 Oem3 4 4 2 5>
    <ApplyTemplate Conditional2 Oem1 1 4 2 3 Oem3>
    <ApplyTemplate Conditional1 L 4 3 2 5>
    <ApplyTemplate Conditional2 K 1 3 2 3 L>
    <ApplyTemplate Conditional3 J 2 K Oem1>
    <ApplyTemplate Conditional1 H 4 2 2 5>
    <ApplyTemplate Conditional2 G 1 2 2 3 H>
    <ApplyTemplate Conditional4 F 2 2 G J>
    <ApplyTemplate Conditional1 D 4 1 2 5>
    <ApplyTemplate Conditional2 S 1 1 2 3 D>
    <ApplyTemplate Conditional4 "A; Alt Ctrl F2" 1 2 S F>
    <ApplyTemplate Conditional1 Oem4 4 4 3 5>
    <ApplyTemplate Conditional2 P 1 4 3 2 Oem4>
    <ApplyTemplate Conditional1 O 4 3 3 5>
    <ApplyTemplate Conditional2 I 1 3 3 2 O>
    <ApplyTemplate Conditional3 U 3 I P>
    <ApplyTemplate Conditional1 Y 4 2 3 5>
    <ApplyTemplate Conditional2 T 1 2 3 2 Y>
    <ApplyTemplate Conditional4 R 2 3 T U>
    <ApplyTemplate Conditional1 E 4 1 3 5>
    <ApplyTemplate Conditional2 W 1 1 3 2 E>
    <ApplyTemplate Conditional4 "Q; Alt Ctrl F3" 1 3 W R>
    <ApplyTemplate Conditional1 plus 3 4 4 5>
    <ApplyTemplate Conditional2 minus 1 4 4 2 plus>
    <ApplyTemplate Conditional1 0 3 3 4 5>
    <ApplyTemplate Conditional2 9 1 3 4 2 0>
    <ApplyTemplate Conditional1 8 3 2 4 5>
    <ApplyTemplate Conditional1 7 3 4 5 4>
    <ApplyTemplate Conditional2 6 1 4 5 2 7>
    <ApplyTemplate Conditional1 5 3 3 5 4>
    <ApplyTemplate Conditional2 4 1 3 5 2 5>
    <ApplyTemplate Conditional3 3 4 9 minus>
    <ApplyTemplate Conditional2 2 1 2 4 2 8>
    <ApplyTemplate Conditional1 1 3 1 4 5>
    <ApplyTemplate Conditional4 F12 2 4 2 3>
    <ApplyTemplate Conditional2 F11 1 1 4 2 1>
    <ApplyTemplate Conditional4 "F10; Alt Ctrl F4" 1 4 F11 F12>
    <ApplyTemplate Conditional4 "F9; Alt Ctrl F5" 1 5 F1 F3>
    <ApplyTemplate Conditional1 F8 3 2 5 4>
    <ApplyTemplate Conditional2 F7 1 2 5 2 F8>
    <Hotkey Alt Ctrl Shift F6>
        <If MouseIsOverWindow WoW1>
            <DoHotkey Hotkey Alt Ctrl Shift Oem5>
        <EndIf>
    <Hotkey Alt Ctrl Shift F5>
        <If MouseIsOverWindow WoW3>
            <DoHotkey Hotkey Alt Ctrl Shift Q>
        <Else If MouseIsOverWindow WoW2>
            <DoHotkey Hotkey Alt Ctrl Shift A>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift F6>
        <EndIf>
    <ApplyTemplate Conditional3 F4 5 4 6>
    <ApplyTemplate Conditional4 F3 2 5 F7 F4>
    <ApplyTemplate Conditional1 F2 3 1 5 4>
    <ApplyTemplate Conditional2 F1 1 1 5 2 F2>
    <Hotkey Alt Ctrl X>
        <DisplayVars>
        <If MouseIsOverWindow WoW5>
            <DoHotkey Hotkey Alt Ctrl Shift F9>
        <Else If MouseIsOverWindow WoW4>
            <DoHotkey Hotkey Alt Ctrl Shift F10>
        <Else>
            <DoHotkey Hotkey Alt Ctrl Shift F5>
        <EndIf>
    <Label w1 Local SendWinM WoW1>
    <Label w2 Local SendWinM WoW2>
    <Label w3 Local SendWinM WoW3>
    <Label w4 Local SendWinM WoW4>
    <Label w5 Local SendWinM WoW5>
    <KeyList TheKeyList 0-9, Plus, Minus, F2>
    <Hotkey LCtrl TheKeyList; LAlt TheKeyList>
        <SendLabel w4>
            <Key %Trigger%> 
    <Hotkey TheKeyList>
        <SendLabel w1, w2, w3, w4, w5>
            <Key %Trigger%> 
    <Hotkey Alt Ctrl L>
        <SetTaskbarAutoHide On>
        <LaunchAndRename WoW1>
        <LaunchAndRename WoW2>
        <LaunchAndRename WoW3>
        <LaunchAndRename WoW4>
        <LaunchAndRename WoW5>
        <DefaultWindowLayout>
    <Template Launch>
        <Hotkey Alt Ctrl %1%>
            <If WinDoesNotExist WoW%1%>
                <LaunchAndRename WoW%1%>
                <DefaultWindowLayout>
            <EndIf>
    <EndTemplate>
    <ApplyTemplate Launch 1>
    <ApplyTemplate Launch 2>
    <ApplyTemplate Launch 3>
    <ApplyTemplate Launch 4>
    <ApplyTemplate Launch 5>
    <Hotkey pause>
        <sendpc local>
        <If HotkeysAreOff>
           <TurnHotkeysOn>
           <SetButtonColors ON 0x00FF00 0x0F0F0F>
           <SetButtonText ON HKN>
        <Else>
           <TurnHotkeysOff>
           <SetButtonColors ON 0xfF0000 0xffFFff >
           <SetButtonText ON off>
        <EndIf>
    <Hotkey Alt Ctrl A>
        <Toggle>
            <sendpc local>
            <SetButtonColors ACT 0x00FF00 0x0F0F0F>
            <SetButtonText ACT AWT>
            <SetActiveWindowTrackingDelay 0>
            <SetActiveWindowTracking On> 
        <Toggle>
            <sendpc local>
            <SetButtonColors ACT 0xfF0000 0xffFFff >
            <SetButtonText ACT off>
            <SetActiveWindowTracking Off> 
    <Hotkey Alt Ctrl D> 
        <DefaultWindowLayout>
    Still pretty ugly but, much shorter, also it might prove harder to maintain if there are any bugs.

    Often while playing I accidentally close a window when I meant to maximise or restore its size, so I've added hot keys for Ctrl Alt 1 - 5 to launch and rename individual windows.

    If you're interested in how it works theres a version with comments on pastebin http://pastebin.com/pbgL9exG
    Last edited by PineBeach : 08-13-2010 at 04:57 AM

Tags for this Thread

Posting Rules

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