Advertisement
Mosmo

Calradia | ChatLog Reader

Feb 4th, 2017
319
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Class ChatLog {
  2.     Static Path := ChatLog.setPath(A_MyDocuments "\GTA San Andreas User Files\SAMP\chatlog.txt")
  3.     getNew( mode = 1 ) {
  4.         Full := FileOpen(ChatLog.Path,"r").Read()
  5.         New := StrReplace(Full,ChatLog.Old,"","",1), ChatLog.Old := Full
  6.         return ( mode == 1 ? StrSplit(RegExReplace(New,"\R$"),"`n","`r") : New )
  7.     }
  8.     setPath( Path ) {
  9.         ChatLog.Old := FileOpen(Path,"r").Read()
  10.         return Path
  11.     }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement