- 4
- 1
Единственное что надо сделать так это поменять путь
Автоматически выдает:
#IfWinActive, GTA:SA:MP
#NoEnv
#SingleInstance, force
#UseHook
SendMode Input
;Автовыдача
Words = (kick|mute|unmute|rmute|vec|unrmute|soffban|getv|v_mute|jail|unjail|offjail|ban|unban|msg|offban|rban|unrban|offwarn|skick|sban|warn|hp|slap|setfuel|o|msg|soffban)
vk71:: ; F10
{
FileRead, CL, %A_MyDocuments%\RADMIR CRMP User Files\SAMP\chatlog.txt
StringReplace, CL, CL, `r`n, `n, 1
StringReplace, CL, CL, `r, `n, 1
RegExMatch("`n" CL "`n", "i).*\s\[\d+:\d+:\d+]\s*\[A]\s(.).*?_(.*?)\[.*?]:\s*((/`*" Words "|" Words ")\s{1}.*?)\n{1}", OutData)
var2 = 0
if OutData4 contains `/
var2 = 1
FileAppend,%OutData3%`n,logachat.ini
if var2 = 1
{
SendMessage, 0x50,, 0x4190419,, A
SendInput,{F6}{raw}%OutData3% | %OutData1%.%OutData2%
}
else
{
SendMessage, 0x50,, 0x4190419,, A
SendInput,{F6}{raw}/%OutData3% | %OutData1%.%OutData2%
}
return
sleep 100
SendInput, {F6}/%OutData3% | %OutData1%. %OutData2%
FileDelete, %A_MyDocuments%\RADMIR CRMP User Files\SAMP\chatlog.txt
return
}
Выдача через F2:
#IfWinActive, ahk_exe gta_sa.exe
#SingleInstance Force
#NoEnv
chatlog := A_MyDocuments "\RADMIR CRMP User Files\SAMP\chatlog.txt"
;FileDelete, %chatlog%
Words = (soffban|warn|kick|ban|mute|jail|skick|hp|skin|o|msg|unwarn|unmute|unjail|offban|offwarn|spcar|sban|offjail|sp|get|a|r|money|alist|getv|slap|getcar|okay|setweather|sw|settime|st|z|z_close)
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*\[H].*?\[.*?]:\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