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

    Default Setup of script on server/client

    I've been wondering for a while how this worked on HKN. If I load a script A on the HKN server and another script B on the HKN client, how are the keystrokes interpreted by the client? Does HKN ignore any scripts present on the client PC or does a key (i.e. F1) sent by the server gets interpreted on the client?
    Classic - Pyrewood Village, Horde, EU

  2. #2

    Default

    Honestly I don't know exactly, because I'm not using more than one computer and i'm obviously not Freddie

    But from my experience with HKN it does the following:

    1. All 'structures' like 'If' and 'Toggle' are only evaluated on the PC you pressed the key on
    2. All lines after an 'SendPC xxx.xxx.xxx.xxx' are directly send to the specified PC and executed on them

    So for a realy simple hotkey like on PC1 (which is not 192.168.1.66):
    <HotKey 1>
    <SendPC 192.168.1.66>
    <SendFocusWin>
    <Key 1>

    HKN would simply send the commands <SendFocusWin> and <Key 1> to the PC 192.168.1.66.
    This would simply result in an '1' in the active window of PC 192.168.1.66 .

    But what you wantetd to know is:
    What happens if the hkn-file of PC2 192.168.1.66 has an Hotkey-definition like:

    <HotKey 1>
    <SendPC Local>
    <SendFocusWin>
    <Key 2>

    In this case if '1' is pressed on PC1 it would not result in sending a '2' to pc2 beccause PC2 only recieves the commands <SendFocusWin> and <Key 1>, and not a command to trigger <HotKey 1>.

    If you want that the <HotKey> on PC2 is actualy triggered you can do this by using this on PC1:

    <HotKey 1>
    <SendPC 192.168.1.66>
    <DoHotkey Hotkey 1>

    so by using this, on PC1 PC2 should receive a '2'.
    Thats my 2 cents, but I think we better wait for freddie to clean up the mess i told you...
    OLIPCS - ordinary life is pretty complex stuff
    ----------------------------------------------------------------
    Pala, Priest, Druid, Hunter, Mage
    Focusless Targetless Leaderless - Wiki
    HotKeyNet - Guide

  3. #3

    Default

    Ok, so basically, the server PC sends the interpreted keypres directly to the clients without interpreting the script on the client pc? I assume this means that the script on the client pc is only used if the key is pressed on the client pc. For instance if we have the following scripts:

    On the server:

    <Hotkey F1>
    <sendpc local>
    <key F1>
    <sendpc 192.168.1.99>
    <key F2>

    On the client:

    <Hotkey F1>
    <sendpc local>
    <key F1>

    I press key F1 on the server PC's keyboard, which will result in F1 being sent to the active window on the server pc and F2 to the active window on the client PC.

    I press F1 on the client PC's keyboard, which will result in F1 being sent sent to the active window on the client pc and nothing else. Correct?
    Classic - Pyrewood Village, Horde, EU

  4. #4

    Default

    Correct?
    I think, yes :)
    And as mentioned above if you want to actualy trigger the Hotkey on the client you would use a <DoHotKey> .
    OLIPCS - ordinary life is pretty complex stuff
    ----------------------------------------------------------------
    Pala, Priest, Druid, Hunter, Mage
    Focusless Targetless Leaderless - Wiki
    HotKeyNet - Guide

  5. #5

    Default

    I assume this means that the script on the client pc is only used if the key is pressed on the client pc.
    As usual, Olipcs answered everything correctly while I was fast asleep in my laggard time zone. A hotkey definition in the client's script is used only if (1) you press the trigger on the client's keyboard or (2) if you send <DoHotkeyKey> to that PC.

    The basic idea is (1) keystrokes injected by a hotkey cannot trigger other hotkeys but (2) if you *want* one hotkey to trigger another, you can do that with <DoHotkey>.

    You can also execute code that is contained in a remote PC's script by putting that code in a user-defined command (subroutine).

    By the way this isn't only true with multiple PCs. It's also true on a single PC with a single script.

    The program's designed like this to prevent a runaway vicious circle in which one hotkey would trigger a second, which would trigger the first, which would trigger the second, etc.
    �Author of HotkeyNet and Mojo

Similar Threads

  1. server and client problem
    By Xumosa in forum Software Tools
    Replies: 2
    Last Post: 02-19-2009, 06:13 PM
  2. AHK script for focusless, leaderless... setup?
    By jdraughn in forum General WoW Discussion
    Replies: 1
    Last Post: 09-16-2008, 11:09 AM
  3. Multibox server hangs after remote client connection
    By Ocean in forum New Multi-Boxers & Support
    Replies: 1
    Last Post: 02-10-2008, 02:16 AM
  4. Multibox server hangs after remote client connection
    By Ocean in forum Software Tools
    Replies: 2
    Last Post: 02-10-2008, 02:15 AM
  5. Synergy Broadcasting to Client AND Server
    By epyphanie in forum Software Tools
    Replies: 4
    Last Post: 10-24-2007, 04:14 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
  •