My 5 box script (complex example)

Using HotkeyNet with World of Warcraft.

My 5 box script (complex example)

Postby rakkar on Tue Dec 02, 2008 12:25 pm

Here is what I use to 5 box my mages

Cool features are:

    Shift Alt Ctrl L to launch and login all 5 instances
    The ability to use F1-F5 to set the focus window to that instance on the left monitor, which is larger, with the remaining 4 windows divided evenly on the 2nd monitor
    Other characters automatically follow the character in the focus window whenever you move forward
    Send a command to a specific window to tell a specific character to use ice block
    Round robin on counterspell
    Polymorph, slow is cast round robin, targeting the focus character's target
    Middle mouse button to left click on all windows, for targeted AOE spells

Requires that in the game, you setup and bind

    Shift Alt Ctrl S to /stopcasting
    Shift Alt Ctrl Z to iceblock
    Shift Alt Ctrl (a,e,i,o,u) to follow the character in that window, with a = window 1, e = window 2, etc. For me, it is /follow Zandarl, /follow Zendarl, etc. Furthermore, you should use /setfocus with the character of the same name.
    Pretty much every spell to use /cast [target=focustarget]

Code: Select all
// Scrolllock is the toggle for hotkeys
//-----------------------------------------------------------
// SUBROUTINE TO LAUNCH AND RENAME A COPY OF WOW.
//-----------------------------------------------------------
<Command LaunchAndRename>
   <SendPC %1%>
      <Run "C:\Games\World of Warcraft\WoW.exe">
      <RenameTargetWin %2%>

//-----------------------------------------------------------
// Initial window positions
//-----------------------------------------------------------
<Command SetF1Pos>
   <TargetWin WoW1>
      <SetWinPos 0 0>
     //   <SetWinSize 1600 1200>
      <SetWinSize 1280 1024>
        <SetForegroundWin>
        <UpdateWin>
  <TargetWin WoW2>
       <SetWinPos 1920 0>
       <SetWinSize 800 600>
  <TargetWin WoW3>
       <SetWinPos 2720 0>
       <SetWinSize 800 600>
  <TargetWin WoW4>
       <SetWinPos 1920 600>
       <SetWinSize 800 600>
   <TargetWin WoW5>
       <SetWinPos 2720 600>
       <SetWinSize 800 600>

//-----------------------------------------------------------
// Shift-alt-L launches all 5 instances and logs in
//-----------------------------------------------------------
<Hotkey Shift Alt Ctrl L>
    <LaunchAndRename Local WoW1>
       <RemoveWinFrame>
       <sendpc local>
       <wait 1000>
        <text YourUsername>
        <Key tab>a
        <text YourPassword>
        <wait 100>
        <Key Enter>                
    <LaunchAndRename Local WoW2>
      <RemoveWinFrame>
       <sendpc local>
       <wait 1000>
        <text YourUsername2>
        <Key tab>
        <text YourPassword>
        <wait 100>
        <Key Enter>
    <LaunchAndRename Local WoW3>
       <RemoveWinFrame>
       <sendpc local>
       <wait 1000>
        <text YourUsername3>
        <Key tab>
        <text YourPassword>
        <wait 100>
        <Key Enter>
    <LaunchAndRename Local WoW4>
       <RemoveWinFrame>
       <sendpc local>
       <wait 1000>
        <text YourUsername4>
        <Key tab>
        <text YourPassword>
        <wait 100>
        <Key Enter>
    <LaunchAndRename Local WoW5>
      <RemoveWinFrame>
       <sendpc local>
       <wait 1000>
        <text YourUsername5>
        <Key tab>
        <text YourPassword>
        <wait 100>
        <Key Enter>
    <SetF1Pos>
   
//-----------------------------------------------------------
// DEFINE MAIL LABELS FOR SENDING KEY STROKES.
//-----------------------------------------------------------
<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>

//-----------------------------------------------------------
// Broadcasted hotkeys that are sent to all systems at the same time
//-----------------------------------------------------------
<Hotkey ScrollLockOn 0-2, 6, 8-9, Minus, Plus>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

<Hotkey Shift ScrollLockOn 0-9, Minus, Plus>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

<Hotkey Alt 0-9, Minus, Plus>
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

//-----------------------------------------------------------
// Broadcast control commands, but do not broadcast ctrl-a ctrl-c and ctrl-v and ctrl-q
//-----------------------------------------------------------
<Hotkey Ctrl b, d-e, g-p, r-u, w-z,Oem4, Oem6 >
<SendLabel w1, w2, w3, w4, w5>
<Key %Trigger%>

//-----------------------------------------------------------
// Simple round robin
//-----------------------------------------------------------
// Ice, counterspell
<Hotkey ScrollLockOn 4,5>
<Toggle>
   <SendLabel w1>
      <Key %Trigger%>
<Toggle>
   <SendLabel w2>
      <Key %Trigger%>
<Toggle>
   <SendLabel w3>
      <Key %Trigger%>
<Toggle>
   <SendLabel w4>
      <Key %Trigger%>
<Toggle>
   <SendLabel w5>
      <Key %Trigger%>
<ResetToggles>

//-----------------------------------------------------------
// Polymorph, Slow.
// Focus stops casting with shift-ctrl-alt-s. This is so the focus can change targets for the other systems
// Other systems cast round robin using focustarget
//-----------------------------------------------------------
<Hotkey ScrollLockOn 3, 7>
<Toggle> // +5
   <If ActiveWinIs WoW1>
      <SendLabel w1>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW2>
      <SendLabel w2>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW3>
      <SendLabel w3>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW4>
      <SendLabel w4>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW5>
      <SendLabel w5>
      <Key %Trigger%>
<Toggle> // +2
   <If ActiveWinIs WoW1>
      <SendLabel w1>
         <Key Shift Alt Ctrl S> // Stop casting
      <SendLabel w3>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW2>
   <SendLabel w2>
         <Key Shift Alt Ctrl S>
      <SendLabel w4>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW3>
      <SendLabel w3>
         <Key Shift Alt Ctrl S>
      <SendLabel w5>
         <Key %Trigger%>
   <Else If ActiveWinIs WoW4>
      <SendLabel w4>
         <Key Shift Alt Ctrl S>
      <SendLabel w1>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW5>
      <SendLabel w5>
         <Key Shift Alt Ctrl S>
      <SendLabel w2>
      <Key %Trigger%>
<Toggle> // +3
   <If ActiveWinIs WoW1>
      <SendLabel w1>
         <Key Shift Alt Ctrl S> // Stop casting
      <SendLabel w4>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW2>
      <SendLabel w2>
         <Key Shift Alt Ctrl S>
      <SendLabel w5>
         <Key %Trigger%>
   <Else If ActiveWinIs WoW3>
      <SendLabel w3>
         <Key Shift Alt Ctrl S>
      <SendLabel w1>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW4>
      <SendLabel w4>
         <Key Shift Alt Ctrl S>
      <SendLabel w2>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW5>
      <SendLabel w5>
         <Key Shift Alt Ctrl S>
      <SendLabel w3>
      <Key %Trigger%>
<Toggle> // +4
   <If ActiveWinIs WoW1>
   <SendLabel w1>
         <Key Shift Alt Ctrl S> // Stop casting
      <SendLabel w5>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW2>
   <SendLabel w2>
         <Key Shift Alt Ctrl S>
      <SendLabel w1>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW3>
      <SendLabel w3>
         <Key Shift Alt Ctrl S>
      <SendLabel w2>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW4>
      <SendLabel w4>
         <Key Shift Alt Ctrl S>
      <SendLabel w3>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW5>
      <SendLabel w5>
         <Key Shift Alt Ctrl S>
      <SendLabel w4>
      <Key %Trigger%>
<Toggle> // +1
   <If ActiveWinIs WoW1>
      <SendLabel w1>
         <Key Shift Alt Ctrl S> // Stop casting
      <SendLabel w2>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW2>
      <SendLabel w2>
         <Key Shift Alt Ctrl S>
      <SendLabel w3>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW3>
      <SendLabel w3>
         <Key Shift Alt Ctrl S>
      <SendLabel w4>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW4>
      <SendLabel w4>
         <Key Shift Alt Ctrl S>
      <SendLabel w5>
      <Key %Trigger%>
   <Else If ActiveWinIs WoW5>
      <SendLabel w5>
         <Key Shift Alt Ctrl S>
      <SendLabel w1>
      <Key %Trigger%>
<ResetToggles>


         
//-----------------------------------------------------------
// Follow active window with Ctrl F
// Shift-Alt-Ctrl <letter> is bound to follow the player with that letter in their name
//-----------------------------------------------------------
<Hotkey ScrollLockOn Ctrl F>
   <If ActiveWinIs WoW1>
      <SendLabel w2, w3, w4, w5>
      <Key Shift Alt Ctrl A>
   <Else If ActiveWinIs WoW2>
      <SendLabel w1, w3, w4, w5>
      <Key Shift Alt Ctrl E>
   <Else If ActiveWinIs WoW3>
      <SendLabel w1, w2, w4, w5>
      <Key Shift Alt Ctrl I>
   <Else If ActiveWinIs WoW4>
      <SendLabel w1, w2, w3, w5>
      <Key Shift Alt Ctrl O>
   <Else If ActiveWinIs WoW5>
      <SendLabel w1, w2, w3, w4>
      <Key Shift Alt Ctrl U>


//-----------------------------------------------------------
// Ice block, targeted to send to the system with that letter in their name
//-----------------------------------------------------------
<Hotkey ScrollLockOn Alt a >
<SendLabel w1>
<Key Shift Alt Ctrl Z>

<Hotkey ScrollLockOn Alt e >
<SendLabel w2>
<Key Shift Alt Ctrl Z>

<Hotkey ScrollLockOn Alt i >
<SendLabel w3>
<Key Shift Alt Ctrl Z>

<Hotkey ScrollLockOn Alt o >
<SendLabel w4>
<Key Shift Alt Ctrl Z>

<Hotkey ScrollLockOn Alt u >
<SendLabel w5>
<Key Shift Alt Ctrl Z>

//-----------------------------------------------------------
// Movement keys move all systems if shift is held down
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn Shift W,A,S,D,Q,E>
<SendLabel w1, w2, w3, w4, w5>
<Key %TriggerMainKey%>

//-----------------------------------------------------------
// W (forward) causes all other systems to follow the character in the window that has focus
//-----------------------------------------------------------
<Hotkey ScrollLockOn W>
<If ActiveWinIs WoW1>
   <SendLabel w1>
      <KeyDown W>
   <SendLabel w2, w3, w4, w5>
      <Key Shift Alt Ctrl A>
<Else If ActiveWinIs WoW2>
   <SendLabel w2>
      <KeyDown W>
   <SendLabel w1, w3, w4, w5>
      <Key Shift Alt Ctrl E>
<Else If ActiveWinIs WoW3>
   <SendLabel w3>
      <KeyDown W>
   <SendLabel w1, w2, w4, w5>
      <Key Shift Alt Ctrl I>
<Else If ActiveWinIs WoW4>
   <SendLabel w4>
      <KeyDown W>
   <SendLabel w1, w2, w3, w5>
      <Key Shift Alt Ctrl O>
<Else If ActiveWinIs WoW5>
   <SendLabel w5>
      <KeyDown W>
   <SendLabel w1, w2, w3, w4>
      <Key Shift Alt Ctrl U>

<HotkeyUp ScrollLockOn W>
<If ActiveWinIs WoW1>
   <SendLabel w1>
   <KeyUp W>
<Else If ActiveWinIs WoW2>
   <SendLabel w2>
   <KeyUp W>
<Else If ActiveWinIs WoW3>
   <SendLabel w3>
   <KeyUp W>
<Else If ActiveWinIs WoW4>
   <SendLabel w4>
   <KeyUp W>
<Else If ActiveWinIs WoW5>
   <SendLabel w5>
   <KeyUp W>

//-----------------------------------------------------------
// Middle mouse button sends left click to all systems
//-----------------------------------------------------------
<UseKeyAsModifier Oem3>
<Hotkey ScrollLockOn MButton>
   <SendLabel w1, w2, w3, w4, w5>
      <ClickMouse LButton>


//----------------------------------------------------------------
// USE F1 TO F5 TO SET FOCUS WINDOW
// Focus window takes the left monitor. Other windows are divided evenly among the right monitor
//----------------------------------------------------------------
<Hotkey ScrollLockOn F1>
  <If ActiveWinIs WoW1>
  <Else>
     <SetF1Pos>
<Hotkey ScrollLockOn F2>
  <If ActiveWinIs WoW2>
  <Else>
     <TargetWin WoW1>
        <SetWinPos 1920 0>
        <SetWinSize 800 600>
     <TargetWin WoW3>
       <SetWinPos 2720 0>
       <SetWinSize 800 600>
     <TargetWin WoW4>
          <SetWinPos 1920 600>
          <SetWinSize 800 600>
      <TargetWin WoW5>
          <SetWinPos 2720 600>
          <SetWinSize 800 600>
     <TargetWin WoW2>
        <SetWinPos 0 0>
        <SetWinSize 1280 1024>
        <SetForegroundWin>
        <UpdateWin>
<Hotkey ScrollLockOn F3>
  <If ActiveWinIs WoW3>
  <Else>
     <TargetWin WoW1>
        <SetWinPos 1920 0>
        <SetWinSize 800 600>
     <TargetWin WoW2>
        <SetWinPos 2720 0>
        <SetWinSize 800 600>
     <TargetWin WoW4>
          <SetWinPos 1920 600>
          <SetWinSize 800 600>
      <TargetWin WoW5>
          <SetWinPos 2720 600>
          <SetWinSize 800 600>
     <TargetWin WoW3>
        <SetWinPos 0 0>
        <SetWinSize 1280 1024>
        <SetForegroundWin>
        <UpdateWin>
<Hotkey ScrollLockOn F4>
  <If ActiveWinIs WoW4>
  <Else>
     <TargetWin WoW1>
        <SetWinPos 1920 0>
        <SetWinSize 800 600>
     <TargetWin WoW2>
        <SetWinPos 2720 0>
        <SetWinSize 800 600>
     <TargetWin WoW3>
        <SetWinPos 1920 600>
        <SetWinSize 800 600>
     <TargetWin WoW5>
        <SetWinPos 2720 600>
        <SetWinSize 800 600>
     <TargetWin WoW4>
        <SetWinPos 0 0>
        <SetWinSize 1280 1024>
        <SetForegroundWin>
        <UpdateWin>
<Hotkey ScrollLockOn F5>
  <If ActiveWinIs WoW5>
  <Else>
     <TargetWin WoW1>
        <SetWinPos 1920 0>
        <SetWinSize 800 600>
     <TargetWin WoW2>
        <SetWinPos 2720 0>
        <SetWinSize 800 600>
     <TargetWin WoW3>
        <SetWinPos 1920 600>
        <SetWinSize 800 600>
     <TargetWin WoW4>
        <SetWinPos 2720 600>
        <SetWinSize 800 600>
     <TargetWin WoW5>
        <SetWinPos 0 0>
        <SetWinSize 1280 1024>
        <SetForegroundWin>
        <UpdateWin>
rakkar
 
Posts: 18
Joined: Tue Dec 02, 2008 12:14 pm

Re: My 5 box script (complex example)

Postby HotkeyNet on Tue Dec 02, 2008 1:00 pm

Thanks for posting this, Rakkar. It's nice to see some of the more complicated things getting used. If you feel like adding this to the Wiki, that would be great.

After you see this comment, I'll move this thread to the WoW section.

Are you sure you need ResetToggles at the end of your toggle hotkeys? Unless you want each of your toggle hotkeys to reset all the others, this command is unnecessary. Toggle hotkeys reset themselves automatically. ResetToggles is meant to be used in a separate hotkey (not one with toggles) to make all your toggle hotkeys reset out of order. If you've included this command to affect other toggle hotkeys (not the one the command is in), then it may be having a useful effect. Otherwise it's only slowing things down slightly.
-- Freddie
HotkeyNet
Site Admin
 
Posts: 5684
Joined: Fri Mar 28, 2008 8:36 pm

Re: My 5 box script (complex example)

Postby rakkar on Tue Dec 02, 2008 1:06 pm

Thanks for letting me know about <ResetToggles>

One feature that would have reduced the complexity of this script is <SendLabel %ActiveWin%> so I can remove the big block of If and ElseIfs.
rakkar
 
Posts: 18
Joined: Tue Dec 02, 2008 12:14 pm

Re: My 5 box script (complex example)

Postby HotkeyNet on Tue Dec 02, 2008 1:17 pm

You can do that with the current program but the syntax is a little different. First you make a label for the active window like this:

Code: Select all
<Label LocalActive Local SendFocusWin>

Then you send to the label like this:

Code: Select all
<SendLabel LocalActive>

However I'm not sure how much this will shorten the definition. You might want to try a subroutine instead or in addition.
-- Freddie
HotkeyNet
Site Admin
 
Posts: 5684
Joined: Fri Mar 28, 2008 8:36 pm

Re: My 5 box script (complex example)

Postby rakkar on Tue Dec 02, 2008 2:15 pm

Here's another macro that might be better for Polymorph and slow (or any spell that you want to cast out over all targets). Another advantage of this version over what I had is you don't need /stopcasting, so only guys already not doing anything else will perform it. Also, it doesn't require that your followers are able to select your focus target, so if your guys are disorganized they still get to do something.

I didn't test it yet since the servers are down for maintenance.

Code: Select all
//-----------------------------------------------------------
// Polymorph, Slow.
// Press 3 times to activate
// All systems spread target with next and previous target, then spread cast
// Do not use [target=focustarget] in the /cast macro
//-----------------------------------------------------------
<Hotkey ScrollLockOn 3, 7>
<Toggle>
   <If ActiveWinIs WoW1>
      <SendLabel w2,w3>
         <Key Tab>
      <SendLabel w4,w5>
         <Key Shift Tab>
   <Else If ActiveWinIs WoW2>
      <SendLabel w1,w3>
         <Key Tab>
      <SendLabel w4,w5>
         <Key Shift Tab>
   <Else If ActiveWinIs WoW3>
      <SendLabel w1,w2>
         <Key Tab>
      <SendLabel w4,w5>
         <Key Shift Tab>
   <Else If ActiveWinIs WoW4>
      <SendLabel w1,w2>
         <Key Tab>
      <SendLabel w3,w5>
         <Key Shift Tab>
   <Else If ActiveWinIs WoW5>
      <SendLabel w1,w2>
         <Key Tab>
      <SendLabel w3,w4>
         <Key Shift Tab>
<Toggle>
   <If ActiveWinIs WoW1>
      <SendLabel w2>
         <Key Tab>
      <SendLabel w4>
         <Key Shift Tab>
   <Else If ActiveWinIs WoW2>
      <SendLabel w1>
         <Key Tab>
      <SendLabel w4>
         <Key Shift Tab>
   <Else If ActiveWinIs WoW3>
      <SendLabel w1>
         <Key Tab>
      <SendLabel w4>
         <Key Shift Tab>
   <Else If ActiveWinIs WoW4>
      <SendLabel w1>
         <Key Tab>
      <SendLabel w3>
         <Key Shift Tab>
   <Else If ActiveWinIs WoW5>
      <SendLabel w1>
         <Key Tab>
      <SendLabel w3>
         <Key Shift Tab>
<Toggle>
   <SendLabel w1,w2,w3,w4,w5>
      <Key %Trigger%>


So you press the key 3 times. The first 2 times causes your other characters to spread out who they target. The third time causes all characters to cast the spell.
rakkar
 
Posts: 18
Joined: Tue Dec 02, 2008 12:14 pm

Test, just a test

Postby ttestermanes on Thu Feb 05, 2009 11:23 am

Hello!
d6ebefb0f18997eafe263f15704c9fb92
And Bye!
ttestermanes
 
Posts: 1
Joined: Thu Feb 05, 2009 11:22 am
Location: Englan

Re: Test, just a test

Postby HotkeyNet on Thu Feb 05, 2009 12:02 pm

Did we pass the test?
-- Freddie
HotkeyNet
Site Admin
 
Posts: 5684
Joined: Fri Mar 28, 2008 8:36 pm

Re: My 5 box script (complex example)

Postby ilililil on Tue Feb 10, 2009 7:40 am

I have been trying to dial in my monitors but I am not really sure how to get it right.

I have a 21"(primary) at 1680x1050 - I would like to keep this resolution because this is what i look at mostly
I have a 19" (secondary) at 1280x1024 - its a square monitor, I am willing to adjust this to really low settings if it helps ease the load on my machine.

utilizing the script in this thread I thought I could just adjust the script until things moved around, that didnt exactly work out. I would like to put 4 windows on the 19" and one in the main view. ANy help would be appreciated. anyh help on what "should" be in the following snippet is all I am currently after.

Code: Select all
<Command SetF1Pos>
   <TargetWin WoW1>
      <SetWinPos 0 0>
     //   <SetWinSize 1600 1024>
      <SetWinSize 1600 1024>
        <SetForegroundWin>
        <UpdateWin>
  <TargetWin WoW2>
       <SetWinPos 1920 0>
       <SetWinSize 800 600>
  <TargetWin WoW3>
       <SetWinPos 2720 0>
       <SetWinSize 800 600>
  <TargetWin WoW4>
       <SetWinPos 1920 600>
       <SetWinSize 800 600>
   <TargetWin WoW5>
       <SetWinPos 2720 600>
       <SetWinSize 800 600>




----------EDIT---------

I thought that would be all... Then I saw the change focus window script... a quick reference to what dimensions I should copy down to that area would help tons to. What did I get myself into???
ilililil
 
Posts: 7
Joined: Tue Feb 10, 2009 7:28 am

Re: My 5 box script (complex example)

Postby olipcs on Tue Feb 10, 2009 7:52 am

Well I think a:

Code: Select all
    <Command SetF1Pos>
       <TargetWin WoW1>
          <SetWinPos 0 0>       
          <SetWinSize 1680 1050>
          <SetForegroundWin>
          <UpdateWin>
      <TargetWin WoW2>
           <SetWinPos 1680 0>
           <SetWinSize 640 512>
      <TargetWin WoW3>
           <SetWinPos 2320 0>
           <SetWinSize 640 512>
      <TargetWin WoW4>
           <SetWinPos 1680 512>
           <SetWinSize 640 512>
       <TargetWin WoW5>
           <SetWinPos 2320 512>
           <SetWinSize 640 512>

...might do what you want.
olipcs
 
Posts: 385
Joined: Thu Oct 23, 2008 7:57 am

Re: My 5 box script (complex example)

Postby HotkeyNet on Tue Feb 10, 2009 7:53 am

Is the secondary monitor on the right or left of the main monitor?
-- Freddie
HotkeyNet
Site Admin
 
Posts: 5684
Joined: Fri Mar 28, 2008 8:36 pm

Next

Return to World of Warcraft

Who is online

Users browsing this forum: No registered users and 1 guest