PDA

View Full Version : HotKeyNet and notepad test



Sinysh
11-10-2008, 08:00 AM
From this pc: <SendWinM Notepad1><Key H><SendWinM Notepad2><Key H>
<SendWinM Notepad1> completed: Window found. Target set to 0x220792 "Notepad1"
<Key H> completed
<SendWinM Notepad2> completed: Window found. Target set to 0x4B06E6 "Notepad2"
<Key H> completed

but nothing happends in either notepad, i edited the sample 2on1 for WoW renamed the Label

olipcs
11-10-2008, 09:15 AM
i would guess, that your notepads are not labeld 'notepad1' and 'notepad2'. This might be because some editors put the Filenames of the current document in there title-tag (Notepad,Word,Firefox does this).

Sinysh
11-10-2008, 09:22 AM
did a little testing and it seems only special buttons like F5 works

ive tried it out again with the game, and movement doesn't work even though i edited the wasd part to accept it again

when i open a chat on both games the letters appear in both games

in the game special keys don't function

the game is called Metin2, maybe i can't use this program to control both

Freddie
11-10-2008, 11:07 AM
The reason your keystrokes aren't appearing in Notepad is because of a combination of two factors. (1) You chose SendWinM for your experiment and (2) Notepad's main window contains a child window (often called a "control") which does the work in that program of receiving text keystrokes and displaying text. Your hotkey instructs SendWinM to send messages to Notepad's main window but only Notepad's child window can make use of those messages. Notepad's main window is receiving your messages but it has no idea what to do with them.

The reason this is complicated is because SendWinM is designed for sending to background windows, which the operating system does not support. If you want to send text keystrokes to Notepad in a simple easy way you can use <SendWin> instead of <SendWinM> but then you can't send to Notepad while it's in the background. Alternatively, if you want to send text keystrokes to Notepad while it's in the background, you have to use a background mode like SendWinM, but then you must write your hotkey differently so it targets Notepad's child window with HotkeyNet's <TargetChild> command.

I don't know anything about Metin2 but if you are trying to get HotkeyNet to work with a new program it will be useful to read the following two pages on HotkeyNet's site:

http://hotkeynet.com/p/sending.html
http://hotkeynet.com/p/background_sending.html

Sinysh
11-10-2008, 06:26 PM
<Label w1 Local SendWin M1>
<Label w2 Local SendWin M2>

with this setting it changes focus to M2 and keys work normaly

<Label w1 Local SendWinM M1>
<Label w2 Local SendWinM M2>
focus stays on M1 and keys repsond like above

Freddie
11-10-2008, 07:43 PM
Yes, that's how they are designed. The difference between SendWin and SendWinM is explained on the two pages I linked above.

Like I said above, you can use SendWinM with Notepad while it remains in the background but you have to target Notepad's child window with TargetChild. You're not doing that here in your examples.