Log in

View Full Version : [HotKeyNet] Can't get MovementHotkey to work



Rekuet
02-07-2015, 03:06 AM
Hello everyone.
First, I'm really really new to all of this.
Any help will be greatly appreciated.

I downloaded "HotKeyNet" and is very interesting and easy to use.
I could manage to get it working nicely, but no matter what, I can't get MovementHotkeys or KeyDown to work.
Those are the "commands" I'm supposed to use in order to make a hotkey holds down a certain key.

I don't understand what I am doing wrong.
I have this simple code just to test this.
<Label Char1 Local SendWin Notepad>
<MovementHotkey D>
<SendLabel Char1>
<Key J>

This is supposed to write any amount of "J" letters, as long as I keep pressing the "D" key, right?
But instead, all I get is one single "J", no matter how much time I keep pressing the "D key".

I've tried this also:
<Label Char1 Local SendWin Notepad>
<Hotkey D>
<SendLabel Char1>
<KeyDown J>


<HotkeyUp D>
<SendLabel Char1>
<KeyUp J>


And the outcome is exactly the same :(

The strangest thing is that I'm not getting any error messages, but according to HotKeyNet log, everything was successful:
From this pc: <SendWin Notepad><KeyDown J>
<SendWin Notepad> completed: Window found. Target set to 0xA0394 "Notepad"
<KeyDown J> completed


From this pc: <SendWin Notepad><KeyUp J>
<SendWin Notepad> completed: Window found. Target set to 0xA0394 "Notepad"
<KeyUp J> completed

Please help me.

Khatovar
02-07-2015, 10:23 AM
"Hotkey" isn't the same as MovementHotkey, you need to use the MovementHotkey command, which is why all the stuff labeled Hotkey isn't working. It needs to look the same as the defined movement hotkeys in the basic script -



//-----------------------------------------------------------
// DEFINE MOVEMENT KEYS THAT WILL GET SENT TO BOTH WOW'S.
// ADD MORE KEYS IF YOU WANT.
//-----------------------------------------------------------
<MovementHotkey ScrollLockOn up, down, left, right>
<SendLabel w1, w2>
<Key %Trigger%>

What you're trying to do should look like this -


<MovementHotkey D>
<SendLabel w1>
<Key J>

But, MovementHotkey is for movement, not spamming keys. It is not a matter of infinitely sending J as long as you hold the key, that would be automation, which you will not get help with here. Movement hotkeys work by maintaining sustained keypresses, just like W works to move a character forward as long as you hold it in single play. W is not being repeatedly sent to the game, the action is just being sustained until the key is released. And depending on the game, it may reject this action anyway.

Rekuet
02-07-2015, 04:00 PM
Thanks for the reply.
If you read the third paragraph of my first message, you can see that the first code I tried, is just as the one you're suggesting:
<Label Char1 Local SendWin Notepad>
<MovementHotkey D>
<SendLabel Char1>
<Key J>
But for some reason is not working.

I understand that this is intended for holding down a key and being able to move a character continuously while the key is pressed and that's just what I'm trying to do.
But since I wasn't able to do it in the game, I tried to figure out how it works on a simple notepad. And in a simple notepad, holding down a key should translate into typing that key multiple times.
I understand that MovementHotkey and KeyDown will not send infinite single keystrokes but will keep a key pressed.

Anyway, the code is not working for me, it is as if I just press the key one time, it's not holding down the key.
What can I do?

Khatovar
02-07-2015, 07:24 PM
Well, Notepad isn't the way to troubleshoot. It's not going to work the way a game does.

http://hotkeynet.com/phpBB3/viewtopic.php?f=6&t=2165
http://hotkeynet.com/phpBB3/viewtopic.php?f=6&t=2581

If you're getting it to send keys to Notepad and the game isn't receiving them, it's probably because of your sendmode settings or the game doesn't allow indirect control. You will need to use the game to determine what the issues are.

Rekuet
02-07-2015, 10:24 PM
Well, thank you.
You are right.

HotkeyNet won't work as expected on the Notepad or any other text processing software, but I've tried more games and MovementHotkey and KeyDown are working on most of the games so far.
Thanks for the help.

I'll probably come back here to ask some other things about HotkeyNet.

luxlunae
02-08-2015, 07:34 PM
What game are you trying to play? Some of this stuff is game specific.

Rekuet
02-09-2015, 01:08 AM
I was trying with Tales of pirates.

Khatovar
02-09-2015, 09:54 AM
http://forum.top.igg.com/viewthread.php?tid=167306&extra=page%3D1

Free games are generally not multibox friendly and it seems this one is no exception. You might be able to successfully mickey mouse something, but it won't be terribly effective and may possibly end up being something against the rules of the game {I.E. I wouldn't go following StupidIdeas' suggestion of packet monitoring and injection.}

Rekuet
02-09-2015, 04:46 PM
Yeah, it's okay.
The rest of the games seems to work fine now, so it's not big deal.
I'm getting the grasp of HotkeyNet so I've been able to make it work fine so far.
Thanks for all the help.