SHARE
TWEET

Untitled

a guest May 29th, 2017 35 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. ----------------------------------------------------
  3. Вставлять этот код необходимо в самое начало скрипта, до начала всех биндов и вне действия #IfWinActive
  4. ----------------------------------------------------
  5. */
  6.  
  7. loop
  8. {
  9.     IfWinNotExist, GTA:SA:MP
  10.     {
  11.         WinWaitActive, GTA:SA:MP
  12.     }
  13.     else
  14.     {
  15.         WinWaitClose, GTA:SA:MP
  16.         FileRead, chatlog, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
  17.         chatlog := chatlog "`r`n"
  18.         StringReplace, chatlog, chatlog, `r`n, `n, All
  19.         FormatTime, filename, , yyyy-MM-dd
  20.         saveChatlog("days", filename, chatlog)
  21.         FormatTime, filename, , YWeek
  22.         saveChatlog("weeks", filename, chatlog)
  23.         FormatTime, filename, , yyyy-MM
  24.         saveChatlog("months", filename, chatlog)
  25.         FormatTime, filename, , yyyy
  26.         saveChatlog("years", filename, chatlog)
  27.         saveChatlog("", "log", chatlog)
  28.        
  29.         loop, %A_MyDocuments%\GTA San Andreas User Files\SAMP\screens\*.png
  30.         {
  31.             FileGetTime, time, %A_LoopFileFullPath%, C
  32.             FormatTime, pattern, %time%, YWeek
  33.             if (pattern < A_YWeek)
  34.             {
  35.                 FileCreateDir, %A_LoopFileDir%\%pattern%
  36.                 FileMove, %A_LoopFileFullPath%, %A_LoopFileDir%\%pattern%\%A_LoopFileName%
  37.             }
  38.         }
  39.     }
  40. }
  41. return
  42.  
  43. saveChatlog(pattern, filename, chatlog) {
  44.     FileCreateDir, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog\%pattern%
  45.     FileAppend, %chatlog%, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog\%pattern%\%filename%.log, CP0
  46. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top