#SingleInstance force
#IfWinActive GTA:SA:MP
#include SAMP.ahk
ansId := ""
SetTimer, ansLoop, 1 ; ANS check
return
ansLoop:
SetTimer, ansLoop, off
loop 99
{
if(RegExMatch(getChatLineEx(A_Index-1), "^\[S\] Вопрос .*\[(\d+)\]:.*", ans))
{
ansId := ans1
break
}
}
SetTimer, ansLoop, 500
return
~3::
if isChatActive() || isDialogOpen()
return
if strlen(ansId)
ansId := " " ansId
SendInput, {f6}/ans%ansId%%A_Space%
return