Advertisement
Guest User

GTA SAMP Log Saver by w8ing

a guest
Jun 8th, 2013
655
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.85 KB | None | 0 0
  1. #include <Date.au3>
  2.  
  3. RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)
  4.  
  5. Dim $gtaStatut = 0
  6. Dim $firstDate, $secondDate, $fullName
  7.  
  8. If Not FileExists ("logs") Then
  9.     DirCreate("logs")
  10. EndIf
  11.  
  12. While 1
  13.     If ProcessExists("gta_sa.exe") Then
  14.         If $gtaStatut = 0 Then
  15.             $gtaStatut = 1
  16.             $firstDate =  StringLeft(StringReplace(_DateTimeFormat(_NowCalc(), 3), ":", "h"), 5)
  17.         EndIf
  18.     Else
  19.         If $gtaStatut = 1 Then
  20.             $secondDate =  StringLeft(StringReplace(_DateTimeFormat(_NowCalc(), 3), ":", "h"), 5)
  21.             $fullName = @ScriptDir & "\logs\" & StringReplace(_DateTimeFormat(_NowCalc(), 2), "/", "_") & " - " & $firstDate & " à " & $secondDate & ".log"
  22.             FileCopy(@MyDocumentsDir & "\GTA San Andreas User Files\SAMP\chatlog.txt", $fullName)
  23.             $gtaStatut = 0
  24.         EndIf
  25.     EndIf
  26.     Sleep(1000)
  27. WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement