Last active
November 13, 2017 16:09
-
-
Save davebrny/564328c8cfd9f85987ed9d4d0578d423 to your computer and use it in GitHub Desktop.
(autohotkey) - the default random command but without returning the same number twice in a row
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
randomer(min="", max="") { | |
static last_random | |
loop, | |
random, this_random, % min, % max | |
until (this_random != last_random) | |
last_random := this_random | |
return this_random | |
} | |
/* | |
[script info] | |
description = the default random command but without returning the same number twice in a row | |
source = https://gist.github.com/davebrny/564328c8cfd9f85987ed9d4d0578d423 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment