Problem with script?

Asked

Viewed 62 times

1

I’d like to try to solve my problem. I made a SCRIPT in the program AUTOHOTKEY in which I use a combination key UP(up arrow) + LEFT (left arrow) and this combination activates the Numpadhome key, but the UP key becomes a prefix key and loses its main function. I researched and added in the script a function that activates along with the combination key the initial function of the UP key. Only when I did this the UP Key when pressed only activates 1x.

Ex: In the game that I play, when I press the UP key, the doll keeps walking up until I release the key.

When I activate this script and press the UP key the dummy walks only once and stops, I wonder if there is any function that can include so that qnd I press the UP key, run the walk up function and only stop when release.

Thank you.

Follow the script below:

Up & Left:: NumpadHome

Up:: Send  {Up}
  • Put * in front of *Up:: Send {Up}

  • didn’t work =/ which happened when I hit the combination key up and left, the dummy keeps walking non-stop, just for when I tighten the combination again. what I wanted, is that only the UP key , again perform the normal function of walking up and while I keep the key pressed.. dps q I release the key , to.

  • Tried to put * on both or only on up&left?

  • What is the same javascript code? Without the code is hard to say, but trying to guess, it seems to me the difference between listening to the event keypress and keydown. In the keypress only does something when the key is pressed and dropped whereas keydown just having the key pressed that is already interpreted

  • I do not know much to do, I researched a lot about and I could not.. but when I researched talked about this keydown.. how could I put this in the script ?

  • Hudson, I just put it where you asked.

  • You have to put a complete minimum example and vericavel to understand and reproduce the problem.

Show 2 more comments

1 answer

2

~Up & Left:: NumpadHome

The prefix ~ will cause the original keys not to be changed and your submissions will not be intercepted.

If the behavior is intentional and only needs the Up key, you can change the combination to: Left & Up:: NumpadHome In this case the Left key will be disabled, but the Up will work normally when isolated.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.