Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Date.au3>
- RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", @ScriptName, "REG_SZ", @ScriptFullPath)
- Dim $gtaStatut = 0
- Dim $firstDate, $secondDate, $fullName
- If Not FileExists ("logs") Then
- DirCreate("logs")
- EndIf
- While 1
- If ProcessExists("gta_sa.exe") Then
- If $gtaStatut = 0 Then
- $gtaStatut = 1
- $firstDate = StringLeft(StringReplace(_DateTimeFormat(_NowCalc(), 3), ":", "h"), 5)
- EndIf
- Else
- If $gtaStatut = 1 Then
- $secondDate = StringLeft(StringReplace(_DateTimeFormat(_NowCalc(), 3), ":", "h"), 5)
- $fullName = @ScriptDir & "\logs\" & StringReplace(_DateTimeFormat(_NowCalc(), 2), "/", "_") & " - " & $firstDate & " à " & $secondDate & ".log"
- FileCopy(@MyDocumentsDir & "\GTA San Andreas User Files\SAMP\chatlog.txt", $fullName)
- $gtaStatut = 0
- EndIf
- EndIf
- Sleep(1000)
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement