Close
Showing results 1 to 5 of 5
  1. #1

    Default HotkeyNet a Few Issues

    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.

    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.

    Code:
    /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
    Code:
    /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

  2. #2

    Default

    Quote Originally Posted by rocnroll View Post
    <ToggleWin WoW3 WoW4> failed: None of the windows on the toggle list were found.
    That's because you're asking the local copy of HKN1 to execute that command. The local copy looks for those windows on its own PC and of course fails to find them because those windows are on the remote PC.

    You need to send that command to the remote copy of HKN1 with <SendPC> like this:

    Code:
    <SendPC 192.168.1.67>
         <ToggleWin WoW3 WoW4>
    (The above is a fragment, it needs to go in a command or hotkey definition.)

    I even tried this while mousing over on the remote PC and tried using the actual PC.
    HKN1 and HKN2 are different programs. Mousing over with HKN2 doesn't change hotkeys in HKN1. (Except in the following way. If you have an HKN1 hotkey loaded on the remote PC, which you probably don't, you can execute it by sending keystrokes with HKN2.)
    Last edited by Freddie : 09-04-2009 at 01:28 AM
    �Author of HotkeyNet and Mojo

  3. #3

    Default

    Quote Originally Posted by rocnroll View Post
    F3 will toggle WoW1 and WoW2 for PIP (my PIP is off a little for some reason).
    SetWinRegion and SetWinRect/SetWinPos are designed so the numbers match when there's no window frame. (You can remove the frames with RemoveWinFrame.) If you want to keep the frames it's easier to write your PIP code with AlwaysOnTop since nothing needs to match that way.

    F4 will toggle PIP off, but whichever window was PIP, stays small (I could resize it manually or click maximize). What wrong there?
    The size doesn't change because you didn't write anything that would change the size. Here's what your F4 hotkey does:

    Code:
        <If WinSizeIs WoW1 1680 1050> // FINDS BIG WINDOW
              <TargetWin WoW1>  // TARGETS BIG WINDOW
                    <SetWinRegion none> // REMOVES HOLE FROM BIG WINDOW
                    <SetForegroundWin> // MOVES BIG WINDOW TO FOREGROUND
                    <RestoreWinSize> // IF BIG WINDOW WAS MINIMIZED OR MAXIMIXZED, MAKES IT NORMAL AGAIN
                    <UpdateWin> // REDRAWS BIG WINDOW
    Last edited by Freddie : 09-04-2009 at 01:31 AM
    �Author of HotkeyNet and Mojo

  4. #4

    Default

    Thanks! I knew it was a PEBKC problem.

  5. #5

    Default

    Yeah but you never know if the problem exists between my keyboard and chair or yours.
    Last edited by Freddie : 09-04-2009 at 02:53 AM
    �Author of HotkeyNet and Mojo

Posting Rules

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