Skip to content

Instantly share code, notes, and snippets.

View ravikumarjain's full-sized avatar

ravikumarjain

View GitHub Profile
@ravikumarjain
ravikumarjain / Random_File_Open.ahk
Created August 21, 2018 08:14
This autohotkey script opens randomly any file from a folder.
;This is not my original script. I took from sevral places (please see links below) and combined it in one script.
;https://autohotkey.com/board/topic/10394-run-some-random-file-jpg-present-in-a-list/
Loop, D:*.pptx
{
Filenames .= A_LoopFileFullPath . "`n"
}
FileAppend, %Filenames% , D:\ravi1.txt
Loop, Read, D:\ravi1.txt
LineCnt++
Random, LineNum, 1, %LineCnt%
@ravikumarjain
ravikumarjain / hotstrings_tooltip.ahk
Created October 28, 2015 08:55
autohotkey Hotstrings with tooltip
;This is not my original script. I took from sevral places (please see links below) and combined it in one script.
;http://www.autohotkey.com/board/topic/58483-how-to-access-the-hotstring-recognizer/
;https://superuser.com/questions/936306/tooltip-should-appear-after-typing-two-letters-of-the-hotstrings/
Loop, Read, %A_ScriptFullPath%
If RegExMatch(A_LoopReadLine,"^\s*:.*?:(.*)", line) ; gathers the hotstrings
hs.= line1 "`n"
Loop {
Input, out,V L1 ;,{BS} ;I removed this ,{BS}
If out in ,,,`t,`n, ,.,?,! ; hotstring delimiters