B
B
belov12452022-01-20 22:47:35
autohotkey
belov1245, 2022-01-20 22:47:35

I don't know how to add the code (copy copy of the text)?

Help write code to copy text starting with a specific word from a SAMP chat. We need a code that, when pressing F2, copied the administrator's response and output to me in the chat, but on my behalf.
An example from a chat from another admin:
"Admin name_surname[id] for name2_surname2[id]: "Admin response for player" "
I need to copy his answer.

F2::
way = %A_MyDocuments%\ARIZONA CRMP User Files\SAMP\chatlog.txt
FileDelete, %A_MyDocuments%\ARIZONA CRMP User Files\SAMP\chatlog.txt
Loop
{
FileRead, file, %A_MyDocuments%\ARIZONA CRMP User Files\ SAMP\chatlog.txt
IfInString, file, Administrator
{
SendInput, {F6}/pm | Have a nice game{left 16}
FileDelete, %A_MyDocuments%\ARIZONA CRMP User Files\SAMP\chatlog.txt
}
}
return

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question