explanation

Ask gaming related questions (AHK v1.1 and older)
Vladik2304
Posts: 24
Joined: 20 Jan 2022, 15:58

explanation

Post by Vladik2304 » 22 Jan 2022, 13:54

please explain the meaning of this code

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%

User avatar
mikeyww
Posts: 26882
Joined: 09 Sep 2014, 18:38

Re: explanation

Post by mikeyww » 22 Jan 2022, 14:23

It has a few hotkeys followed by some unreachable code that will never execute. The first hotkey contains some deprecated commands that seem to normalize line endings. A string match then occurs for text following digits separated by colons. The match is appended to a file. Layout is changed to Russian before sending the match with some other characters. Click the posted commands to see more details-- or just contact the author to ask what the script does!

Post Reply

Return to “Gaming Help (v1)”