Created
July 5, 2013 06:56
-
-
Save 0x4a/5932502 to your computer and use it in GitHub Desktop.
displays a random line from fortune.txt
#tool #ahk
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
FileEncoding UTF-8 | |
Loop,read,fortune.txt | |
numbers:=A_INDEX | |
random,rnd,1,%numbers% | |
FileReadLine,line,fortune.txt,%rnd% | |
MsgBox your fortune: `n%line% |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment