Skip to content

Commit

Permalink
Auto reload conf file when motified
Browse files Browse the repository at this point in the history
  • Loading branch information
goreliu committed Apr 21, 2016
1 parent 9075d6e commit 8f0f56e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions RunZ.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -1675,12 +1675,19 @@ AlignText(text)
}

WatchUserFileList:
FileGetTime, newModifyTime, %g_UserFileList%
if (lastModifyTime != newModifyTime)
FileGetTime, newUserFileListModifyTime, %g_UserFileList%
if (lastUserFileListModifyTime != "" && lastUserFileListModifyTime != newUserFileListModifyTime)
{
LoadFiles()
lastModifyTime := newModifyTime
}
lastUserFileListModifyTime := newUserFileListModifyTime

FileGetTime, newConfFileModifyTime, %g_ConfFile%
if (lastConfFileModifyTime != "" && lastConfFileModifyTime != newConfFileModifyTime)
{
GoSub, RestartRunZ
}
lastConfFileModifyTime := newConfFileModifyTime
return

; 0:英文 1:中文
Expand Down

0 comments on commit 8f0f56e

Please sign in to comment.