Log in

View Full Version : or [HotKeyNet] functionality



wolpak
03-05-2009, 10:52 AM
Just to start off, I am a brand new multiboxer. Have a 3-box kinda going, but trying to figure out the best way to set up and macros and all. Started using HotKeyNet and I liked it a lot, until I had a button broadcasted to all 3 windows and only two responded and the third would respond with that button if I held ctrl down. So, I purchased KeyClone, which is nice, but I feel like HotKeyNet is easier to set up controls.

Anyway, I'd probably go with either one who will add mouse click functionality. Not hitting a button to click a mouse, but clicking something onscreen and having that passed to your clones. I think this should be fairly easy to set up if looked at the right way. In concept, it is likely impossible since in game actions cannot be broadcast out of the game (or I presume we can't do anything with it). However, the only thing that is in game is receiving the mouse click. The click originates outside the game, which means it is clearly capturable and able to send to other clones. The question arises how to capture it and what will it mean.

For me, I am a UI guy. I don't like mapping stuff to the keyboard. I point and click. I'd love to have my Shaman's and Warlock's macros in actionbars on my Paladin's screen so I can click a button on the Shaman bar and cast lightning bolt and in the other window he casts it. I think it should be possible because I had done something like this when I scripted for Palm games. There is a coordinate system that it looks like HotKeyNet and I think Keyclone recognizes. You click at X= 250 and Y = 475 and those programs recognize that you do that. If that occurs, which I think it does, then the rest is just configuration.

Basically, the end user has to keep the same size WOW main screen the entire time. Let's just say they fill up a 20" monitor with the main and 4 others on another monitor. You click a button for the Keymapper to listen for 2 clicks. First click is to get the bottom left Coords, the second click is for the upper right. The user does as best as he or she(hehe) can and now the program knows the size of your window (if it already knows, then obviously skip this part).


The user then creates a macrobar for his Shaman (who lives in wow window 2) but on his Paladin's screen (in Wow window 1). All he has to do is create a dummy macro. He can put some local functionality in it like having the Paladin do something when it is clicked, but in concept it is just a placeholder so you know what you are pressing. Then have the KeyClone program listen for two clicks, the first is for the bottom left coords and the second is for the upper right coords. Now it knows the exact location of that button on your screen. So, if the botton lies at 200,200 - 300,300, and you click 210, 219, then the keylogger program picks up that you clicked within the box as it is listening for coordinates on each mouse click.

The end user then maps a button to that keyclick. Say, the letter L for Lightning Bolt. KeyClone then takes those coords in, converts them to a keystroke and sends them to one or multiple windows (based on what you want). Now, on the slave's window, you have a macro set up to cast Lightning Bolt that is on an actionbar that is keymapped to the letter L. L gets sent and now your Shaman casts lightning bolt.

Not sure if that sounds complicated to the end user, but I am sure that the KeyClone guy gets what I am looking at. All the program needs to do is listen for coordinate clicks and then pair a button with it and it should work. The end user just has to define what his dummy buttons do and he can have his UI covered with tons of action bars for the other classes he manages. Would make running with different classes MUCH MUCH easier.

Let me know what you guys think and how much of a cut I get if it works and people buy your stuff in mass quantities.

Freddie
03-05-2009, 11:24 AM
Started using HotKeyNet and I liked it a lot, until I had a button broadcasted to all 3 windows and only two responded and the third would respond with that button if I held ctrl down.
HotkeyNet's mouse broadcasting requires an adjustment on the Settings Panel. The program's mouse broadcasting abilities have been improving over the months. They got a lot better a few days ago in build 165. I'm going to try another improvement today.

If I understand your idea correctly -- I'm not sure I do -- but if you're saying you want to define rectangles on a window, and when somebody clicks inside the rectangle, certain actions happen in your other game windows, that's already in HotkeyNet. The syntax looks like this:


<Hotkey LButton>
<If MouseIsOverWindowRect wow1 600 700 90 60>
...do something...

wolpak
03-05-2009, 11:34 AM
I should have previewed before I posted. I see there is functionality to press F1 on your keyboard and it simulates a mouse click somewhere on your screen. IE, it moves the mouse to 400,100 and clicks. I am looking for the opposite. Move your mouse to 400,100 and click and it send F1 to the tool. That way I can create a toolbar on my main's screen dedicated to one of my slaves and click on the icons to make them do all sorts of neat stuff I have macroed.

Oh, and I am not proposing to broadcast mouse clicks, but rather, convert them to keystrokes so that they can be passed on to the slaves and converted into macros.

Freddie
03-05-2009, 11:36 AM
Our posts crossed because I was editing my earlier one while you replied to it. Sorry.

Yes, I think what you're describing is already in HotkeyNet. However HotkeyNet doesn't draw the virtual rectangles, if that's what you want. You have to imagine them or use existing in-game doodads to represent your virtual buttons.

wolpak
03-05-2009, 11:38 AM
But that is just a one time function for LButton, no? Can I create multiple ones for many buttons? And does that peform on a click or on a mouseover?

Freddie
03-05-2009, 11:45 AM
You can make a thousand of them if you want. To make this clear, why don't we do the following. How about, you give me an example of two buttons you'd like to make. Tell me where they should be located in which window(s), and which button or key-button combination you want to use to click them, and what they should do when you click them. I'll show you how to write that in HotkeyNet's script language.

Or, if it turns out you're imagining something that HotkeyNet can't do, I'll try to add it to the program today.


And does that peform on a click or on a mouseover?
Normally HotkeyNet's actions take place on either a key/button press or a key/button release. What would you like it do on a mouseover?

wolpak
03-05-2009, 11:52 AM
Thanks, that's really cool of you.

Ok, I'll give you an example and we'll see if it works, though this isn't real, I can obviously edit it to make it work with mine.

Pally main has an action bar dedicate to Shaman abilities. On it is Lightning Bolt and Healing wave. I have no idea the size of the bottons, but let's just say they are 100X100.

So, when I click somehwere between 200,200 and 300,300 on my main Pally window, I want it to have my Shaman cast LB on my target (obviously that will be done with a macro). When I press somewhere between 200,300 and 200,400 it then casts Heaving Wave on me.

I figured the best way to do this would be to have the macro set up on my Shaman to LB my target and put on his Actionbar and Healing Wave to target my Pally and put that on his AB and keybind them to some key. Then, when you press on the Pally screen, it converts it to a key, sends it to my Shaman's window and triggers his macro.

Freddie
03-05-2009, 12:15 PM
Okie dokie. I'll assume you want to click with the right button but it could be any button or any combination of keys and buttons. And I'll assume the shaman's LB is bound to Alt Shift F1, and that his HW is bound to Alt Ctrl F2:



<Hotkey RButton>
<If MouseIsOverWindowRect Pally 200 200 100 100>
<SendLabel Shaman>
<Key Alt Shift F1>
<Else If MouseIsOverWindowRect Pally 200 300 100 100>
<SendLabel Shaman>
<Key Alt Ctrl F2>
Please note that the numbers go X position, Y position, width, height.

olipcs
03-05-2009, 12:22 PM
well for the situation you described I would try the following:



<Hotkey LButton>
<If MouseIsOverWindowRect Pally 200 200 100 100>
<SendLabel shaman>
<Key 6>
<Else If MouseIsOverWindowRect Pally 200 300 100 100>
<SendLabel shaman>
<Key 7>
<Else>
<ClickMouse>


and you would bind the 'LB my target' to a button activated by 6, and the 'healing wave on pala' to 7 on the shaman.

EDIT: damn, freddie beat me ;)

wolpak
03-05-2009, 12:24 PM
I'll test that out, but if it works, that is pretty cool. How many nested If statements can we have? I mean, that is going to be one long Hot key if I have 2 slaves and want to map like 12 buttons each.

olipcs
03-05-2009, 12:29 PM
the <if>,<Else If>,<else> can have as many <elseif>s as you like, but you can'T nest <if>s inside of <if>s.

wolpak
03-05-2009, 12:32 PM
Ok, if this works, I'll post about it here. Sorry for thinking you didn't have this functionality, but it looks like it works how I envisioned it...to a degree.

Freddie
03-05-2009, 12:39 PM
Sorry for thinking you didn't have this functionality...
Absolutely not your fault! The program has dozens or even hundreds of features that hardly anyone knows about. That's the problem with a script-driven program. The features are invisible unless you plow through the documentation. Hardly anyone is going to spend hours reading all that stuff.


well for the situation you described I would try the following:



<Hotkey LButton>
<If MouseIsOverWindowRect Pally 200 200 100 100>
<SendLabel shaman>
<Key 6>
<Else If MouseIsOverWindowRect Pally 200 300 100 100>
<SendLabel shaman>
<Key 7>
<Else>
<ClickMouse>

Thanks for correcting my mistake! :)

Wolpak, you should always listen to Olipcs because unlike me, he actually uses the program. I onlly code the thing. :)


How many nested If statements can we have? I mean, that is going to be one long Hot key if I have 2 slaves and want to map like 12 buttons each.
Sure it will be long but you have to write a definition for each button somewhere, so why not in a hotkey definition? It's just syntax. Like Olipcs said there's no length limit.

wolpak
03-05-2009, 12:52 PM
I am going to see if I can find any script that will output the cordinates of my mouse on a press since I have no idea what they are onscreen. Unless you want to tell me first.

Freddie
03-05-2009, 12:59 PM
HotkeyNet shows you the coordinates in its upper right window each time you click .... but only if you've loaded a script that has at least one hotkey with a mouse button in its trigger.

It does this for efficiency reasons -- it only loads a mouse hook when absolutely necessary, to avoid slowing your PC even a tiny bit.

You can load this hotkey if you need to:


<Hotkey LCtrl RAlt RButton>
<ToggleWin X Y>
That will never get triggered (unless you have three hands, because that's how many you need to press that combination of buttons), but it will cause HotkeyNet to load a mouse driver.

wolpak
03-05-2009, 01:32 PM
Trying to figure this out. Not sure what coordinates the parameters are looking for, the window or the screen. Either way, it seems like it has hijacked my mouse to not do anything at all if the conditions are not met.

Freddie
03-05-2009, 01:40 PM
Not sure what coordinates the parameters are looking for, the window or the screen.
If you write <If MouseIsOverWindowRect ...> like we showed you, it uses window coordinates. If you want to use screen coordinates, you would write <If MouseIsOverScreenRect ...>.


Either way, it seems like it has hijacked my mouse to not do anything at all if the conditions are not met.
That's why Olipcs corrected my example. You need to add a final "Else" for that case. But I just tested and here's the best way to write it. This should go at the end:


<Else>
<SendFocusWin>
<ClickMouse NoMove %Trigger%>

wolpak
03-05-2009, 01:47 PM
I am not sure that the coordinates are being populated properly. It might have something to do with the focus window though. However, it highjacks the mouse on all left clicks. I cannot left click any other screen or even anything on my screen. For some reason it triggers for everything.

wolpak
03-05-2009, 01:55 PM
Also, is there a way to bracket in the individual keys. I have no idea what the program is looking for in terms of completed functions.



<Hotkey Home>
<SendLabel warlock>
<Keydown up>

When it reads the first line, is it looking for two more lines? One a SendLabel and the other a Key stroke?

Freddie
03-05-2009, 01:59 PM
I am not sure that the coordinates are being populated properly.
It would generate error messages if that were the case.


However, it highjacks the mouse on all left clicks.
To reduce your frustration level, I very strongly recommend that you test this with some other trigger until you get it working. I would test with this trigger:


<Hotkey Shift RButton>
That way your test hotkey won't get triggered unless you hold down a shift key and press right button.

wolpak
03-05-2009, 02:00 PM
Ok, that's better, though for some reason it is focusing on another botton to send. However, this keeps me from mouse looking around by holding down the lbutton.

wolpak
03-05-2009, 02:02 PM
And it's keeping me from dragging the scroll bar on this screen. Kinda funny.

wolpak
03-05-2009, 02:07 PM
Sorry for being such a pain...



Does MouseIsOverWindowRect move to the closest rectangle on the window? Only cause I put in the coords for the box I wanted, but another box did the appropriate command. I tried changing the coords and then a third box did the appropriate command, but neither were the coords I put in. It looks like it ignored my one box, but nsapped to the other two.

Freddie
03-05-2009, 02:08 PM
Also, is there a way to bracket in the individual keys. I have no idea what the program is looking for in terms of completed functions.

<Hotkey Home>
<SendLabel warlock>
<Keydown up>

When it reads the first line, is it looking for two more lines? One a SendLabel and the other a Key stroke?
No, the program is much more flexible than that. It doesn't look for anything in particular. But it does check to make sure you've told it enough info so it can perform some specific action without ambiguity. If you haven't told it enough info, it will generate a red error message when you load the script.

Unfortunately there are no block-markers in the program. This was my attempt to make it easy for non-programmers. Instead the program uses a rule-based approach to block nesting. I now think this was a mistake but it's too late to change it. HotkeyNet 2.0 will have a block markers. There's info about the program's rule-based approach here:

http://hotkeynet.com/p/blocks_and_nesting.html

Freddie
03-05-2009, 02:10 PM
And it's keeping me from dragging the scroll bar on this screen. Kinda funny.
Sorry, dragging isn't implemented yet for the default Else. If you get this working and decide to use it, I'll finish that right away.

Freddie
03-05-2009, 02:12 PM
Does MouseIsOverWindowRect move to the closest rectangle on the window?
No. It uses exactly the coordinates you wrote. It's possible you found a bug, though. If you think you did, please paste your definition here and I'll duplicate the problem and see what's going on.

Freddie
03-05-2009, 02:21 PM
Sorry for being such a pain...
You're not a pain! You're doing me a huge favor by beta testing my program. :)

wolpak
03-05-2009, 02:23 PM
Wonder how that will effect gameplay with no dragging. Guess a lot since I wouldn't be able to drag icons or spells onto stuff and whatnot.

Ok, here are two screenshots.

http://i200.photobucket.com/albums/aa88/jkaplow/wow1.jpg

http://i200.photobucket.com/albums/aa88/jkaplow/wow2.jpg

wolpak
03-05-2009, 02:28 PM
Ok, I couldn't print screen the coords since it goes to the print screen info instead. Either way, I promise those are the win coords of that button. The other button with the seal ends up sending the command over and it is nowhere near those coords.

Freddie
03-05-2009, 02:29 PM
Wonder how that will effect gameplay with no dragging. Guess a lot since I wouldn't be able to drag icons or spells onto stuff and whatnot.
Oh yeah, I couldn't stand that. That's why I would use RButton for this. But like I said, if you want to use this, I'll finish it up so it drags. I should say, I'll try to do that ... it may not be so easy. I generally work on things that people nag me about or at least tell me they're using, and nobody has ever complained about this, so it's been on the back burner.


Ok, here are two screenshots.
Great. Does this mean the coordinates are working okay?

wolpak
03-05-2009, 02:30 PM
Ok, off to lunch, I expect this problem resolved by the time I return. Not often I can take a day off and was actually hoping to play...rofl...

wolpak
03-05-2009, 02:32 PM
Wonder how that will effect gameplay with no dragging. Guess a lot since I wouldn't be able to drag icons or spells onto stuff and whatnot.
Oh yeah, I couldn't stand that. That's why I would use RButton for this. But like I said, if you want to use this, I'll finish it up so it drags. I should say, I'll try to do that ... it may not be so easy. I generally work on things that people nag me about or at least tell me they're using, and nobody has ever complained about this, so it's been on the back burner.


Ok, here are two screenshots.
Great. Does this mean the coordinates are working okay?Ok, that makes sense, will use the right button, but after I finally get it working. Screenshots show how the coords are all off. How one icon on the right runs the command for the icon on the left. Though, in theory, it is working and I am happy about that. However, I'd like it to work correctly.

Freddie
03-05-2009, 02:33 PM
Ok, I couldn't print screen the coords since it goes to the print screen info instead. Either way, I promise those are the win coords of that button. The other button with the seal ends up sending the command over and it is nowhere near those coords.
Have a great lunch. :) I don't understand this though -- there's a problem with one of the buttons? If you paste the script, and explain where you're clicking, and tell me what messages the program displays, I can do something about it.

wolpak
03-05-2009, 02:33 PM
Oh and my guys are really bored waiting for me, just sitting around shooting the shtuff...

Freddie
03-05-2009, 02:34 PM
I'd like it to work correctly.
Of course, me too! Help me understand what's wrong and i'll post a new build with a fix later today.

By the way, you may be the first person who ever tested this. :) I can't remember if I received any other reports on this feature.

wolpak
03-05-2009, 02:38 PM
Ok, I couldn't print screen the coords since it goes to the print screen info instead. Either way, I promise those are the win coords of that button. The other button with the seal ends up sending the command over and it is nowhere near those coords.
Have a great lunch. :) I don't understand this though -- there's a problem with one of the buttons? If you paste the script, and explain where you're clicking, and tell me what messages the program displays, I can do something about it.

I captured where I was clicking in the screenshot. I left the HKN and the script open enough to see. Sorry, forgot you don't read minds. Anyway, here's the script cut...




<Hotkey LButton>
<If MouseIsOverWindowRect Wow1 635 471 666 444>
<SendLabel shaman>
<Key ctrl numpad3>
<Else>
<SendFocusWin>
<ClickMouse NoMove %Trigger%>

However, in the screenshot, that is the location of the axe that is labeled rockbiter. When I click that, nada. However, when I click the action bar on the right with the seal, instead of triggering the seal, it puts rockbiter on the shaman. Teh seal's coords are 1167 479 which is nowehere near what I have in the mouseoverwindowrect. I then tried this script...

<Hotkey LButton>
<If MouseIsOverWindowRect Wow1 335 171 366 144>
<SendLabel shaman>
<Key ctrl numpad3>
<Else>
<SendFocusWin>
<ClickMouse NoMove %Trigger%>

And it would trigger when I clicked the attack icon I have at 688 736. Again, nowhere near the location in the script.

wolpak
03-05-2009, 02:40 PM
I'd like it to work correctly.
Of course, me too! Help me understand what's wrong and i'll post a new build with a fix later today.

By the way, you may be the first person who ever tested this. :) I can't remember if I received any other reports on this feature.I didn't even know it was a feature. I read much of your wiki and looked through the commands but I never saw mouseoverwinrect in there or how it could function. I am willing to bet that a lot of people would love to send commands to their slaves from their main by clicking on a button on their screen. Kinda like a virtual keyboard.

Owltoid
03-05-2009, 03:12 PM
Damn Freddie, you're a freaking saint. Wolpak has been demanding and rude this whole thread, especially with complaining about his guys just sitting around and how it better be resolved by after lunch... you're a better man than I, that's for sure.

wolpak
03-05-2009, 03:16 PM
Damn Freddie, you're a freaking saint. Wolpak has been demanding and rude this whole thread, especially with complaining about his guys just sitting around and how it better be resolved by after lunch... you're a better man than I, that's for sure.I thinks he realizes I was kidding.

Freddie
03-05-2009, 04:16 PM
I thinks he realizes I was kidding.
You were? I thought it was really lunch time. <Burp>

All right, I"m going to try your hotkey now. Back in a little while.

Oh, about reading the documentation and not seeing this. It's documented very briefly on the reference page for "If." And it was discussed at great length in HotkeyNet's forum when it was in the planning stages. But other than that, I usually don't advertise this kind of feature until it has been in the program long enough for bug reports to come in and get it debugged. Otherwise people run into a bug and get upset and think the program sucks. A lot of people don't understand what "beta test" means.

wolpak
03-05-2009, 04:29 PM
I thinks he realizes I was kidding.
You were? I thought it was really lunch time. <Burp>

All right, I"m going to try your hotkey now. Back in a little while.

Oh, about reading the documentation and not seeing this. It's documented very briefly on the reference page for "If." And it was discussed at great length in HotkeyNet's forum when it was in the planning stages. But other than that, I usually don't advertise this kind of feature until it has been in the program long enough for bug reports to come in and get it debugged. Otherwise people run into a bug and get upset and think the program sucks. A lot of people don't understand what "beta test" means.
Ok, I actually figured it out and it works.

First off, I had the wrong coord grid. X Y starts in the upper left and not the bottom left. All good. Then my button was working, but it extened WAY beyond the button. I tried to find the outter limits and it clicked to me, the secodn set of numbers aren't coordinates, they are offests. My button is 30X30, so I have that as the second set of coordinates and BINGO it works beautifully. My shaman's arms light up nice and green.

Thanks man for pointing me in teh right direction. Hope you can add a bit of this into your reference for others to see cause I have to imagine that on screen button clicking passed to the party is fun for all.

wolpak
03-05-2009, 04:31 PM
I thinks he realizes I was kidding.
You were? I thought it was really lunch time. <Burp>

All right, I"m going to try your hotkey now. Back in a little while.

Oh, about reading the documentation and not seeing this. It's documented very briefly on the reference page for "If." And it was discussed at great length in HotkeyNet's forum when it was in the planning stages. But other than that, I usually don't advertise this kind of feature until it has been in the program long enough for bug reports to come in and get it debugged. Otherwise people run into a bug and get upset and think the program sucks. A lot of people don't understand what "beta test" means.

Oh, and I know what beta test means, I just try to pretend it's a released product ;)



And don't let me stop you from trying to code the drag. Cause I do a look around with the right click as well!

Freddie
03-05-2009, 04:46 PM
... it clicked to me, the secodn set of numbers aren't coordinates, they are offests. My button is 30X30, so I have that as the second set of coordinates and BINGO it works beautifully.
Excelllent. I just tested one of your hotkeys and noticed how wide it was, so I was about to ask you if we had this misunderstanding.

I like to define rectangles this way with width and height for the last two numbers because this way, if you change the size or position, you only have to change two numbers. The other way you have to change four. Also this is how Windows defines rectangles in most of its newer APIs, so it's a sort of standard.


Thanks man for pointing me in teh right direction. Hope you can add a bit of this into your reference for others to see cause I have to imagine that on screen button clicking passed to the party is fun for all.
And thank you for your patience and helping to test. After this thread I have more confidence that it's working right so I'll probably add a page to the instructions about it.


And don't let me stop you from trying to code the drag. Cause I do a look around with the right click as well!
I'll get to it pretty soon. :)

Freddie
03-05-2009, 04:54 PM
I forgot to say, you can drag normally now if you don't mind passing the mouse click to the pally's window. If that's okay, you can add <PassThrough> to the hotkey and remove the <Else> at the end.


Hotkey LButton>
<PassThrough>
<If MouseIsOverWindowRect Wow1 635 471 666 444>
<SendLabel shaman>
<Key ctrl numpad3>

wolpak
03-05-2009, 05:35 PM
I just finished up for my newbie shaman and it works great. I'll post a little tutorial about it later.