rocnroll
09-04-2009, 12:43 AM
OK, I've been pouring through db.com and hotkeynet.com cobbling together pieces of scripts to come up with one that has the functionality I like. Most of the script works and the part that doesn't is probably due to a PEBKC error. :)
I'm also using HKN2 for KVM (works great).
I can launch WoW on my two PCs, rename and reposition the windows just fine. My F1 key will swap WoW1 and WoW2 great. F2 will not swap WoW3 and WoW4, I get this error in HKN:
<ToggleWin WoW3 WoW4> failed: None of the windows on the toggle list were found.
Is this not possible with a remote PC? I like seeing the full screen and was hoping that I could swap screens easily. I even tried this while mousing over on the remote PC and tried using the actual PC. What am I doing wrong?
My next problem is with PIP (maybe I'm trying to get to fancy).
F3 will toggle WoW1 and WoW2 for PIP (my PIP is off a little for some reason). F4 will toggle PIP off, but whichever window was PIP, stays small (I could resize it manually or click maximize). What wrong there?
I have a couple of WoW macro questions that I will post below this code.
//--------------------------------------------------------------------
// SUBROUTINE TO LAUNCH, RENAME, SET POSITION AND SIZE A COPY OF WOW.
//--------------------------------------------------------------------
<Command LaunchAndRename>
<SendPC %3%>
<Run %1%>
<RenameTargetWin %2%>
<SetWinPos 0 0>
<SetWinSize %4% %5%>
//----------------------------------------------------------------
// HOTKEY TO LAUNCH, RENAME, SET POSITION AND SIZE A COPY OF WOW.
//----------------------------------------------------------------
<Hotkey Alt Ctrl L>
<LaunchAndRename "d:\Program Files\World of Warcraft\WoW.exe" WoW1 Local 1680 1050>
<LaunchAndRename "d:\Program Files\World of Warcraft\WoW.exe" WoW2 Local 1680 1050>
<LaunchAndRename "c:\Program Files\World of Warcraft\WoW.exe" WoW3 192.168.1.67 1280 1024>
<LaunchAndRename "c:\Program Files\World of Warcraft\WoW.exe" WoW4 192.168.1.67 1280 1024>
//-----------------------------------------------------------
// DEFINE A MAIL LABEL FOR EACH WOW
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
<Label w3 192.168.1.67 SendWinM WoW3>
<Label w4 192.168.1.67 SendWinM WoW4>
//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO ALL WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<Hotkey ScrollLockOn A-Z, Plus, Minus, 0-9, F1-F12 except W, A, S, D, Q, E, F1, F2, F3, F4>
<SendLabel w1, w2, w3, w4>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO ALL WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn up, down, left, right>
<SendLabel w1, w2, w3, w4>
<Key %Trigger%>
//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM3 (ON U.S. KEYBOARDS,
// THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem3>
<Hotkey ScrollLockOn Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3, w4>
<ClickMouse %TriggerMainKey%>
//------------------------------------------------------------
//SWAP WINDOWS
//------------------------------------------------------------
<Template SwapWindows>
<Hotkey ScrollLockOn %1%>
<ToggleWin %2% %3%>
<EndTemplate>
<ApplyTemplate SwapWindows F1 WoW1 WoW2>
<ApplyTemplate SwapWindows F2 WoW3 WoW4>
//----------------------------------------------------------------
// SET PIP CONFIGURATION
// Usage: <SetPip BigWindowName LittleWindowName>
// This command is called by <Hotkey F3> which is defined below.
//----------------------------------------------------------------
<Command SetPip>
<TargetWin %6%>
<SetWinPos %7% %8%>
<SetWinSize %9% %10%>
<TargetWin %1%>
<SetWinPos %2% %3%>
<SetWinSize %4% %5%>
<TargetWin %6%>
<SetForegroundWin>
<UpdateWin>
<TargetWin %1%>
<SetWinRegion %7% %8% %9% %10%>
<SetForegroundWin>
//----------------------------------------------------------------
// TOGGLE PIP CONFIG WITH HOTKEY
//----------------------------------------------------------------
<Hotkey ScrollLockOn F3>
<Toggle>
<SetPip WoW1 0 0 1680 1050 WoW2 1040 515 400 300>
<Toggle>
<SetPip WoW2 0 0 1680 1050 WoW1 1040 515 400 300>
//----------------------------------------------------------------
// TOGGLE PIP ON/OFF
//----------------------------------------------------------------
<Hotkey F4>
<If WinSizeIs WoW1 1680 1050>
<TargetWin WoW1>
<SetWinRegion none>
<SetForegroundWin>
<RestoreWinSize>
<UpdateWin>
<If WinSizeIs WoW2 1680 1050>
<TargetWin WoW2>
<SetWinRegion none>
<SetForegroundWin>
<RestoreWinSize>
<UpdateWin>
// %1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>
<EndTemplate>
// %1% : master key
// %2% : slave key
// %3% : modifier
// %4% : Active window
// %5% : Slave Windows
<Template SendLeaderless>
<If ActiveWinIs %4%>
<ApplyTemplate SendMasterAndSlave "%1%" "%2%" "%3%" "%5%">
<EndTemplate>
// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW1 "w2,w3,w4">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt" WoW2 "w1,w3,w4">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rshift" WoW3 "w1,w2,w4">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rctrl" WoW4 "w1,w2,w3">
<EndTemplate>
<ApplyTemplate FTL "F6" "F6">
<ApplyTemplate FTL "F7" "F7">
In WoW, my follow only works from the group leader and the fourth toon does not follow. I've bound the F6 and F7 keys to the two macros. I've unbound the modifiers also on all toons. Assist seems fine from my main PC, but not on the remote PC.
Apologies for so many questions and all the code. Thanks in advance.
/assist [mod:ralt,nomod:rctrl,nomod:rshift]Frostbelt;[nomod:ralt,mod:rctrl,nomod:rshift]Cordina;[nomod:ralt,nomod:rctrl,mod:rshift]Earthwave;[mod:ralt,mod:rctrl,nomod:rshift]Moorlock
/stopmacro [nomod]
/target[mod:ralt,nomod:rctrl,nomod:rshift,target=Frostbelt][nomod:ralt,mod:rctrl,nomod:rshift,target=Cordina][nomod:ralt,nomod:rctrl,mod:rshift,target=Earthwave][mod:ralt,mod:rctrl,nomod:rshift=Moorlock]
/f
/targetlasttarget
I'm also using HKN2 for KVM (works great).
I can launch WoW on my two PCs, rename and reposition the windows just fine. My F1 key will swap WoW1 and WoW2 great. F2 will not swap WoW3 and WoW4, I get this error in HKN:
<ToggleWin WoW3 WoW4> failed: None of the windows on the toggle list were found.
Is this not possible with a remote PC? I like seeing the full screen and was hoping that I could swap screens easily. I even tried this while mousing over on the remote PC and tried using the actual PC. What am I doing wrong?
My next problem is with PIP (maybe I'm trying to get to fancy).
F3 will toggle WoW1 and WoW2 for PIP (my PIP is off a little for some reason). F4 will toggle PIP off, but whichever window was PIP, stays small (I could resize it manually or click maximize). What wrong there?
I have a couple of WoW macro questions that I will post below this code.
//--------------------------------------------------------------------
// SUBROUTINE TO LAUNCH, RENAME, SET POSITION AND SIZE A COPY OF WOW.
//--------------------------------------------------------------------
<Command LaunchAndRename>
<SendPC %3%>
<Run %1%>
<RenameTargetWin %2%>
<SetWinPos 0 0>
<SetWinSize %4% %5%>
//----------------------------------------------------------------
// HOTKEY TO LAUNCH, RENAME, SET POSITION AND SIZE A COPY OF WOW.
//----------------------------------------------------------------
<Hotkey Alt Ctrl L>
<LaunchAndRename "d:\Program Files\World of Warcraft\WoW.exe" WoW1 Local 1680 1050>
<LaunchAndRename "d:\Program Files\World of Warcraft\WoW.exe" WoW2 Local 1680 1050>
<LaunchAndRename "c:\Program Files\World of Warcraft\WoW.exe" WoW3 192.168.1.67 1280 1024>
<LaunchAndRename "c:\Program Files\World of Warcraft\WoW.exe" WoW4 192.168.1.67 1280 1024>
//-----------------------------------------------------------
// DEFINE A MAIL LABEL FOR EACH WOW
//-----------------------------------------------------------
<Label w1 Local SendWinM WoW1>
<Label w2 Local SendWinM WoW2>
<Label w3 192.168.1.67 SendWinM WoW3>
<Label w4 192.168.1.67 SendWinM WoW4>
//-----------------------------------------------------------
// DEFINE HOTKEYS FOR ALL KEY COMBINATIONS THAT WILL GET
// SENT TO ALL WOWS. ADD MORE KEY COMBO'S IF YOU WANT.
//-----------------------------------------------------------
<Hotkey ScrollLockOn A-Z, Plus, Minus, 0-9, F1-F12 except W, A, S, D, Q, E, F1, F2, F3, F4>
<SendLabel w1, w2, w3, w4>
<Key %Trigger%>
//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO ALL WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn up, down, left, right>
<SendLabel w1, w2, w3, w4>
<Key %Trigger%>
//-----------------------------------------------------------
// BROADCAST MOUSE CLICKS. HOLD DOWN OEM3 (ON U.S. KEYBOARDS,
// THAT'S THE SQUIGGLE KEY IN UPPPER LEFT CORNER) WHEN YOU
// WANT TO BROADCAST.
//-----------------------------------------------------------
<UseKeyAsModifier Oem3>
<Hotkey ScrollLockOn Oem3 LButton, MButton, RButton, Button4, Button5>
<SendLabel w1, w2, w3, w4>
<ClickMouse %TriggerMainKey%>
//------------------------------------------------------------
//SWAP WINDOWS
//------------------------------------------------------------
<Template SwapWindows>
<Hotkey ScrollLockOn %1%>
<ToggleWin %2% %3%>
<EndTemplate>
<ApplyTemplate SwapWindows F1 WoW1 WoW2>
<ApplyTemplate SwapWindows F2 WoW3 WoW4>
//----------------------------------------------------------------
// SET PIP CONFIGURATION
// Usage: <SetPip BigWindowName LittleWindowName>
// This command is called by <Hotkey F3> which is defined below.
//----------------------------------------------------------------
<Command SetPip>
<TargetWin %6%>
<SetWinPos %7% %8%>
<SetWinSize %9% %10%>
<TargetWin %1%>
<SetWinPos %2% %3%>
<SetWinSize %4% %5%>
<TargetWin %6%>
<SetForegroundWin>
<UpdateWin>
<TargetWin %1%>
<SetWinRegion %7% %8% %9% %10%>
<SetForegroundWin>
//----------------------------------------------------------------
// TOGGLE PIP CONFIG WITH HOTKEY
//----------------------------------------------------------------
<Hotkey ScrollLockOn F3>
<Toggle>
<SetPip WoW1 0 0 1680 1050 WoW2 1040 515 400 300>
<Toggle>
<SetPip WoW2 0 0 1680 1050 WoW1 1040 515 400 300>
//----------------------------------------------------------------
// TOGGLE PIP ON/OFF
//----------------------------------------------------------------
<Hotkey F4>
<If WinSizeIs WoW1 1680 1050>
<TargetWin WoW1>
<SetWinRegion none>
<SetForegroundWin>
<RestoreWinSize>
<UpdateWin>
<If WinSizeIs WoW2 1680 1050>
<TargetWin WoW2>
<SetWinRegion none>
<SetForegroundWin>
<RestoreWinSize>
<UpdateWin>
// %1% : Master Key
// %2% : Slave Key
// %3% : Modifier
// %4% : SlavesToSend
<Template SendMasterAndSlave>
<SendFocusWin>
<Key %1%>
<Sendlabel %4%>
<Key %3% %2%>
<EndTemplate>
// %1% : master key
// %2% : slave key
// %3% : modifier
// %4% : Active window
// %5% : Slave Windows
<Template SendLeaderless>
<If ActiveWinIs %4%>
<ApplyTemplate SendMasterAndSlave "%1%" "%2%" "%3%" "%5%">
<EndTemplate>
// %1% : master-key
// %2% : slave-key
<Template FTL>
<Hotkey %1%>
<ApplyTemplate SendLeaderless "%1%" "%2%" "rctrl" WoW1 "w2,w3,w4">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt" WoW2 "w1,w3,w4">
<ApplyTemplate SendLeaderless "%1%" "%2%" "rshift" WoW3 "w1,w2,w4">
<ApplyTemplate SendLeaderless "%1%" "%2%" "ralt rctrl" WoW4 "w1,w2,w3">
<EndTemplate>
<ApplyTemplate FTL "F6" "F6">
<ApplyTemplate FTL "F7" "F7">
In WoW, my follow only works from the group leader and the fourth toon does not follow. I've bound the F6 and F7 keys to the two macros. I've unbound the modifiers also on all toons. Assist seems fine from my main PC, but not on the remote PC.
Apologies for so many questions and all the code. Thanks in advance.
/assist [mod:ralt,nomod:rctrl,nomod:rshift]Frostbelt;[nomod:ralt,mod:rctrl,nomod:rshift]Cordina;[nomod:ralt,nomod:rctrl,mod:rshift]Earthwave;[mod:ralt,mod:rctrl,nomod:rshift]Moorlock
/stopmacro [nomod]
/target[mod:ralt,nomod:rctrl,nomod:rshift,target=Frostbelt][nomod:ralt,mod:rctrl,nomod:rshift,target=Cordina][nomod:ralt,nomod:rctrl,mod:rshift,target=Earthwave][mod:ralt,mod:rctrl,nomod:rshift=Moorlock]
/f
/targetlasttarget