Need Help

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Oscu
Posts: 1
Joined: 17 Jun 2018, 22:01

Need Help

17 Jun 2018, 22:09

Hi, how could I put so that when I put the number 2, the program uses the number 2 and then I use 3, 4 and 5 but these last numbers do it randomly.
For example:
Pulse 2 and the program could do;
2, 4,3,5 or 2,5,4,3 .... etc


THXXXXXXX
wolf_II
Posts: 2688
Joined: 08 Feb 2015, 20:55

Re: Need Help

18 Jun 2018, 05:26

Try this:
  • each press of the 2-key results in a random response in the range 2..5

Code: Select all

KeyList := [2, 3, 4, 5]

$2::
    Random, Number, 1, 4
    Send, % KeyList[Number]
Return
I hope that helps.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: gongnl, Joey5, RandomBoy, Rohwedder and 388 guests