Skip to content

Instantly share code, notes, and snippets.

@bamanzi
Created November 19, 2013 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bamanzi/7545523 to your computer and use it in GitHub Desktop.
Save bamanzi/7545523 to your computer and use it in GitHub Desktop.
cnblogs-textfilter.au3
if WinExists("Text Filter - [CNBlogs_Ing") Then
WinActivate("Text Filter - [CNBlogs_Ing")
Else
$last = "20110101"
$lastfile = "D:\Downloads\CNBlogs_Ing_Backup_201103281004.txt"
$path = "d:\Downloads\";
$search = FileFindFirstFile($path & "CNBlogs_Ing_Backup*.txt")
If $search = -1 Then Exit
While 1
$file = FileFindNextFile($search)
If @error Then ExitLoop
$dt = FileGetTime($path & $file, 1, 1)
If @error Then ContinueLoop
If $dt > $last Then
$last = $dt
$lastfile = $file
EndIf
WEnd
Run("textfilter "& $path & $lastfile)
Sleep(1000)
EndIf
; set focus to the search box
Send("^f")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment