evilC wrote:
It's a bit of a stretch to go from that to working out which key events to send. It only works out which keys you need to hold *now*, so if, for example it moves from up+right to right, it has no concept that it needs to release up, only a concept that up + right needs holding.
No, it is extremly simple. The tooltip says which key should be pressed, that implies the other keys should be up. So, for example, replace
ToolTip, Up with
{Up down}{Left up}{Right up}{Down up} and
ToolTip,*, is replaced with all keys up. send it with whatever method you like.
evilC wrote:
The image in yours is not always-on-top, nor is it semi-transparent.
There was not a lot of specifications in the original post, I intended for the thread starter to modify it to his needs.
evilC wrote:When you saw the bug, were you using automatic deadzone calculation? (DeadzoneX/Y := -1)?
I think I just noticed a bug in the non-automatic mode.
dz_vars := {x: "PicW", y: "PicH"} should read dz_vars := {x: PicW, y: PicH}
I tried both modes, and had the same problem. However, your correction and this solves the not-stopping problem:
Code: Select all
if (abs(pos[axis]) > DeadZone[axis]) ; This is wrong: if (abs(pos[axis]) > DeadZone)
evilC wrote:
Finally, yours is impractical to use. If I am at the top, and I want to move to right - moving the mouse in a straight line would output up, nothing, right - because if you draw a straight line from the top to the right, it clips the black part.
I intended to mimic some joystick features, and it does exactly what I wanted. With a joystick, you go from top to right either by rolling it, thus keeping input, or you go down to the center, stopping input, then right to continue input.
If you want to be able to make a straight line between, eg, top and right, without going to through the center, adjust either the inner (decrease) or outer (increase) radius.
Also, because I'm keeping the cursor inside the circle, you never get far away from the center, thus, to abort input you never need to move back more than the difference between the outer and inner radius. And the way the mouse is returned to the circle, i.e., moving it back to the closest point on the circle, means that, for example, if you're in the up position, and want to go to the right, then only moving the mouse to the right, without any downward movement, will roll the cursor down to the right, and transistion from UP->UP+RIGHT->RIGHT. Just like a joystick would.
evilC wrote:
With mine, if you are at up and move in a straight line down+right, you get up, up+right, right.
I'm not sure I get this, perhaps we have don't have the same preferences, or perhaps we are not really getting what the other person is trying to do.
Since you don't restrict the cursor position, it keeps going over to the game screen and falling back to the center, thus halting the input. I tried it in quake, with an overlay centered at the middle of the game screen. I suppose this is easily fixed though.
evilC wrote:
Please do not take this as me saying "Your script stinks" because clearly you are doing some interesting stuff with it, it just needs more work to be practical.
I do not.
Cheers.