I have been meaning to do this for a while -- to write some AHK code to open a random file (picture) in a folder. I have a folder full of notes (mostly web clippings as screen captures) about life hacks and other information I find useful. The AHK script allow me to review them once a while. I invoke the script by typing "//rp" anywhere, resulting in paintbrush (my default image viewer) to open up with the note.
The code follows. "O:\PhotoNotes\*.*" is the location of the screen captures. "run" invokes the default viewer.
:://rp::total = 0Loop, O:\PhotoNotes\*.*total += 1Random, select, 1, %total%Loop, O:\PhotoNotes\*.*IfEqual, A_Index, %select%, Setenv, file, %A_LoopFileFullPath%run, %file%,,hidereturn
I save my notes mostly as images because I find that if I put it in OneNote, I rarely go back to the notes and read them over again. This is my solution to that problem.