HotKeyNet still isn't finding the window. this is what a script should look like
Code:
//----------------------------------------------------------
// LAUNCH AND RENAME
//----------------------------------------------------------
<Command LaunchAndRename>
<SendPC %1%>
<Run %2%>
<RenameTargetWin %3%>
LaunchAndRename starts your programs and renames the windows via path or default window name to a standardized format. It uses arguments as variables which are found within the below Launch Hotkey.
Code:
//----------------------------------------------------------
// LAUNCH HOTKEY
//----------------------------------------------------------
<Hotkey LCtrl LAlt w>
<if WinDoesNotExist WINDOW_NAME>
<LaunchAndRename LOCAL_OR_IP "FULL_PATH_OF_WHATEVER_YOU'RE_RUNNING" WINDOW_NAME>
<endif>
<if WinDoesNotExist DIFFERENT_WINDOW>
<LaunchAndRename LOCAL_OR_IP "FULL_PATH_OF_WHATEVER_YOU'RE_RUNNING" DIFFERENT_WINDOW_NAME>
<endif>
The Launch Hotkey is the key you use to trigger the running and renaming of the programs you are looking for HotKeyNet to control.
Argument 1 - SendPC. Choose which computer the command is sent to. If you are controlling a window on the main PC, then use local. If you are controlling something on the secondary PC, you need to use the IP.
Argument 2 - The Path Name of the program or file you need to run. You keep calling it "Book1". If that is the name of a file on your PC, you need to put in the entire path name here, so that should look something like "C:\Users\UserName\Where\Ever\Book1.txt"
Argument 3 - The Window's "nickname". This is the part that renames the window from it's default {like the "the file's path\filename - Notepad++ [Administator]" that I mentioned in my first response} to a short, simple and unique name that HKN can consistently find. This would be "Book1" or "project" or whatever you like. It must be unique from any other name you would assign to any other window.
Code:
//----------------------------------------------------------
// DEFINE LABELS
//----------------------------------------------------------
<Label w1 Local SendWinM Book1>
<Label w2 IP_ADDRESS SendWinM Book2>
Finally you have your labels. These are aliases for both the window name and location. These are what you will use in the hotkeys themselves. In this instance, anything that uses the label "w1" will send commands to the window on your main PC {local} that is called "Book1". Anything using "w2" will send commands to the window on your remote PC {IP Address} that is called "Book2."
You must run this set of subroutines every time so it can launch and rename the windows properly. This is done by pressing LCtrl LAlt W with HotKeyNet running and the script loaded. Once the windows are defined and named, then keys will know where to go.
Hotkeys are configured this way
Code:
<Hotkey 1>
<SendLabel w1>
<Key 1>
<SendLabel w2>
<Key Ctrl W>
This example says that when you press 1, "w1" which is defined above as the window called Book1 on the main PC, then Book1 receives the key 1. "w2" which is defined as the window called "Book2" on the remote PC receives the key Ctrl W.
Connect With Us