- 1,214
- 1,044
Как правильно сделать? Пример ниже.
Hariro_Beriro[26]: {FFCD00}help
Код:global file_chat := A_MyDocuments "/GTA San Andreas User Files/SAMP/chatlog.txt" SetTimer, Chat, 50 save(chatlog) { static logschat:=A_MyDocuments "\GTA San Andreas User Files\SAMP\ChatLogs\" static chat:=A_MyDocuments "\GTA San Andreas User Files\SAMP\chatlog.txt" FileCreateDir, % logschat A_MM "-" A_YYYY FileAppend, % chatlog, % logschat A_MM "-" A_YYYY "\" A_DD "." A_MM "." A_YYYY ".txt" FileDelete, % chat return } Chat() { FileRead, chatlog, % file_chat if (RegExMatch(chatlog, "([A-z_]{4,24}) ID (\d{1,3})", chattext)) { save(chatlog) sendChat("pm " chattext1 " ) } }
AutoHotKey:
RegExMatch(in, ".*\[(\d{1,3})\]:.*", out)