Code: Select all
F2::
FileRead, Str, %A_MyDocuments%\RADMIR CRMP User Files\SAMP\chatlog.txt
StringReplace, Str, Str, `r`n, `n, 1
StringReplace, Str, Str, `r, `n, 1
RegExMatch("`n" Str "`n", "i).*\n\[\d+:\d+:\d+]\s*\[A].*?\[.*?]:\s*(/`*" Words "\s.*?)\n", Match)
ToolTip % Clipboard := Match1
FileAppend,%Match1%`n,chat.ini
Sleep 0
SendMessage, 0x50,, 0x4190419,, A
SendInput,{F6}%match1%{space}
clipboard =
ToolTip
FileDelete,%A_MyDocuments%\RADMIR CRMP User Files\SAMP\chatlog.txt
Return
!Right:: SendInput, {right 150}
!Left:: SendInput, {left 150}/{right 150}{space}
#IfWinActive, ahk_exe gta_sa.exe
#SingleInstance Force
#NoEnv
chatlog := A_MyDocuments "\RADMIR CRMP User Files\SAMP\chatlog.txt"
;FileDelete, %chatlog%