Тема: [AHK] Проблемы с активным окном [Разобрался. Тема ЗАКРЫТА]
Суть такова что у меня есть скрипт.
#Persistent
#IfWinActive GTA:SA:MP
#Include SAMP.ahk
while (true)
{
Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
loop
{
label:
Loop, Read, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
{
IfInString, A_LoopReadLine, БАНКОВСКИЙ ЧЕК
{
goto, label1
}
else IfInString, A_LoopReadLine, Server closed the connection
{
goto, label2
}
else IfInString, A_LoopReadLine, Добро пожаловать на Advance RolePlay
{
goto, label3
}
else IfInString, A_LoopReadLine, Сервер возобновит работу в течение минуты
{
goto, label4
}
}
SetTimer, CheckPayDay1, 1000
return
CheckPayDay1:
if (A_Min == 59 && A_Sec == 30 || A_Min == 29 && A_Sec == 30 || A_Min == 30 && A_Sec == 30)
{
Send {vk57 down}
sleep 500
Send {vk57 up}
Sendinput {Esc down}
sleep 50
Sendinput {Esc up}w
Send {vk57 down}
sleep 500
Send {vk57 up}
}
goto, label
label1:
Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
{
Send {vk57 down}
sleep 500
Send {vk57 up}
Sendinput {Esc down}
sleep 50
Sendinput {Esc up}
}
goto, label
label2:
Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
{
SendInput, {f6}/recon 15{Enter}
}
goto, label
label3:
Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
Sleep 3000
Loop, Read, file.txt
{
Sendinput %A_LoopReadLine%{Enter}
sleep 1500
Send {vk57 down}
sleep 500
Send {vk57 up}
Sendinput {Esc down}
sleep 50
Sendinput {Esc up}
}
goto, label
label4:
Filedelete, %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
Fileappend, , %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt
{
SendInput {F6}/recon 180{Enter}
}
}
}
returnНо из-за каких то неполадок выбивает на рабочий стол и сворачивает игру а из-за "#IfWinActive GTA:SA:MP" скрипт не работает (
ВОПРОС: Как сделать чтобы активное окно GTA:SA:MP никогда не сворачивалось а если сворачивалось то разворачивалось сразу же ????
P.S Описал проблему вроде доступно и вопрос вроде поставлен правильно.

