0

In many cases I need to not just generate a list of random integers (which is easy), but to type random integers into various software.

For example, to skip a random number of lines (1 to 100) in Vim, I need to type that number into Vim, then type "j".

Ideally a key combination on the keyboard would do something like that.

  • I press it. It types 34.

  • I press it. It types 56.

  • I press it. It types 3.

  • ...

3

Here is an AutoHotkey script that assigns the key combination WindowsKey+F1 to do what is required:

#F1::
Random, rand, 1, 100
Send %rand%
return

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.