Skip to content

Instantly share code, notes, and snippets.

@0x4a
Created July 5, 2013 06:56
Show Gist options
  • Save 0x4a/5932502 to your computer and use it in GitHub Desktop.
Save 0x4a/5932502 to your computer and use it in GitHub Desktop.
displays a random line from fortune.txt #tool #ahk
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