Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- ----------------------------------------------------
- Вставлять этот код необходимо в самое начало скрипта, до начала всех биндов и вне действия #IfWinActive
- ----------------------------------------------------
- */
- loop
- {
- IfWinNotExist, GTA:SA:MP
- {
- WinWaitActive, GTA:SA:MP
- }
- else
- {
- WinWaitClose, GTA:SA:MP
- FileRead, chatlog, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
- chatlog := chatlog "`r`n"
- StringReplace, chatlog, chatlog, `r`n, `n, All
- FormatTime, filename, , yyyy-MM-dd
- saveChatlog("days", filename, chatlog)
- FormatTime, filename, , YWeek
- saveChatlog("weeks", filename, chatlog)
- FormatTime, filename, , yyyy-MM
- saveChatlog("months", filename, chatlog)
- FormatTime, filename, , yyyy
- saveChatlog("years", filename, chatlog)
- saveChatlog("", "log", chatlog)
- loop, %A_MyDocuments%\GTA San Andreas User Files\SAMP\screens\*.png
- {
- FileGetTime, time, %A_LoopFileFullPath%, C
- FormatTime, pattern, %time%, YWeek
- if (pattern < A_YWeek)
- {
- FileCreateDir, %A_LoopFileDir%\%pattern%
- FileMove, %A_LoopFileFullPath%, %A_LoopFileDir%\%pattern%\%A_LoopFileName%
- }
- }
- }
- }
- return
- saveChatlog(pattern, filename, chatlog) {
- FileCreateDir, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog\%pattern%
- FileAppend, %chatlog%, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog\%pattern%\%filename%.log, CP0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement