Created
March 15, 2017 21:51
-
-
Save TLMcode/32a2484093213a11bf5d62aea48f8878 to your computer and use it in GitHub Desktop.
VLCSongListPopulator.ahk
This file contains hidden or 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
SongFile = SongList.txt | |
SFPath := A_MyDocuments "\" SongFile | |
if !WinExist( "ahk_class QWidget" ) | |
{ | |
Msgbox, 0x10, Whoops!, Make sure VLC is running! | |
Return | |
} | |
if FileExist( SFPath ) | |
FileRead, SFList, % SFPath | |
WinGetTitle, WinTitle, ahk_class QWidget | |
SongName := RegExReplace( WinTitle, "-\s+V.*" ) | |
if !InStr( SFList, SongName ) | |
{ | |
FileAppend, % SongName "`r`n", % SFPath | |
TrayTip,, % SongName " added to song file!" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment