Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <TrayConstants.au3>
- Opt("TrayMenuMode", 3 )
- ;~ GLOBAL VARIABLE
- local $stateGTA = WinExists( "GTA:SA:MP" )
- local $logDir = @MyDocumentsDir & "\GTA San Andreas User Files\SAMP\"
- ;~ TRAY MANAGEMENT
- Opt("TrayMenuMode", 3 )
- TrayCreateItem ( "SAMP Chatlog Saver by Nelson" )
- $chatlogDir = TrayCreateItem ( "Dossier des chatlogs" )
- $quit = TrayCreateItem ( "Quitter" )
- Func findChatlogNewName()
- For $i = 1 To 4000
- local $n = $logDir&"\chatlog ("&$i&").txt"
- If (Not FileExists($n)) Then
- Return $n
- EndIf
- Next
- EndFunc
- While 1
- Sleep( 100 )
- if ($stateGTA == True) Then
- If (Not WinExists( "GTA:SA:MP" )) Then
- FileCopy( $logDir&"\chatlog.txt", findChatlogNewName())
- $stateGTA = False
- EndIf
- Else
- If WinExists( "GTA:SA:MP" ) Then
- $stateGTA = True
- EndIf
- EndIf
- Switch TrayGetMsg()
- Case $chatlogDir
- Run("explorer /e, " & '"' & $logDir & '"')
- Case $quit
- Exit
- EndSwitch
- WEnd
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement