<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Не понимаю, как правильно использовать "if then else if then"]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=14947&amp;type=atom" />
	<updated>2019-08-23T20:14:07Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=14947</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не понимаю, как правильно использовать "if then else if then"]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=135838#p135838" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, спасибо, изменил и стало запускаться, осталось найти почему не активируется выход в меню после определённой строки в чате.</p><div class="codebox"><pre><code>Numpad7::
SendMessage, 0x50,, 0x4190419,, A
way = C:\Users\Anton\Documents\GTA San Andreas User Files\SAMP\chatlog.txt
FileDelete %way%
{
Loop 999999999
{
FileRead, file, %way%
IfInString, file, (Добро пожаловать на GTA RolePlay) then
{ 
Sleep 10000 
SendInput, [Пароль]
FileDelete %way%
Sleep 1500 
SendInput {Enter} 
FileDelete %way% 
sleep 1500 
SendInput {down down} 
FileDelete %way%
sleep 1000 
SendInput {down up}
FileDelete %way%
sleep 1500 
SendInput {down down} 
FileDelete %way%
sleep 1000 
SendInput {down up}
FileDelete %way%
sleep 1000 
SendInput {Enter}
FileDelete %way% 
Sleep 1500 
SendInput {F6}/clist 24{Enter} 
FileDelete %way%
Sleep 1500 
SendInput {F6}/b 888{Enter} 
FileDelete %way%
}
else 
FileRead, file, %way%
IfInString, file, ((( [Ник]: 888 ))) then
{
loop 9999999   
{
  SendInput {Escape down}
sleep 1
  Send {Escape up}
sleep 1000
SendInput {Escape down}
sleep 1
  Send {Escape up}
sleep 5000
FileRead, file, %way%
}
}
else 
FileRead, file, %way%
IfInString, file, (Server closed the connection.) then
{
Sleep 1500 
SendInput {F6}/q{Enter}  
FileDelete %way%
sleep 7000 
DllCall(&quot;SetCursorPos&quot;, int, 800, int, 264)
 Sendinput {LButton Down}
sleep 1
 Sendinput {LButton Up}
}
}
}
Numpad9::
reload
return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Anton_8237]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40351</uri>
			</author>
			<updated>2019-08-23T20:14:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=135838#p135838</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не понимаю, как правильно использовать "if then else if then"]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=135836#p135836" />
			<content type="html"><![CDATA[<p>Во-первых: в заголовках точки не ставятся - это грубая ошибка, в школе не проходили эту тему что-ли? В любом случае в правилах составления заголовков это указано - потрудитесь соблюдать. Во-вторых: обращение обрамляется запятыми, наш форум не имеет функций упоминания пользователей, а потому все ваши сообщения в этой теме содержат ошибки. Но если требовать от Вас приемлемого уровня русского языка я не имею права, да и не буду, <span style="color: #008000">то расставить точки в конце предложений требую. Это последнее предупреждение.</span></p><p>Вам стоит осознать, что если вы собираетесь перенимать опыт у товарищей на этом Форуме, то Вам стоит соблюдать здешние Правила. В противном случае с вами никто дела иметь не будет. От Вас не требуют ничего сверхъестественного. Просто нужно в первую очередь осознавать, что вы приходите сюда в гости к другим людям за советом (которые Вам ничего не обязаны, но при этом сталкиваются с вашим наплевательским отношением к правилам), а не в стол заказов.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2019-08-23T19:09:38Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=135836#p135836</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не понимаю, как правильно использовать "if then else if then"]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=135835#p135835" />
			<content type="html"><![CDATA[<p>А где вы в справке такую конструкцию нашли:<br /></p><div class="codebox"><pre><code>If (IfInString ...</code></pre></div><p>IfInString — это отдельная команда, она не может использоваться, как часть другой, смотрите справку по ней.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2019-08-23T18:55:29Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=135835#p135835</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Не понимаю, как правильно использовать "if then else if then"]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=135834#p135834" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong>, да, я знаю, но я всё перепробовал и не работает выдаёт ошибку и показывает стрелочкой на строчку с первым &quot;if&quot;.</p>]]></content>
			<author>
				<name><![CDATA[Anton_8237]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40351</uri>
			</author>
			<updated>2019-08-23T18:35:39Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=135834#p135834</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Не понимаю, как правильно использовать "if then else if then"]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=135831#p135831" />
			<content type="html"><![CDATA[<p>Приветствую.<br />Заранее извиняюсь за путаницу ниже.<br />Нужно поправить код скрипта, благодаря которому происходила бы авторизация в игре, то есть ввод пароля и выбор определённого пункта для спавна после появления в чате строки &quot;Добро пожаловать на GTA RolePlay&quot;, потом после спавна и появлении строки &quot;Здравствуйте, VIP игрок!&quot; происходил зацикленный выход в меню до появления строчки &quot;Server closed the connection.&quot;, после которой происходил бы выход из игры, а потом благодаря наведению курсора на определённую части экрана и активацию кнопки происходил вход в игру. И чтобы весь этот скрипт был зациклен до нажатия определённой клавиши например при нажатии Numpad7, скрипт снимался с паузы, а потом после нового нажатия скрипт запускался бы с начала.<br />Желательно готовый исправленный код.<br /></p><div class="codebox"><pre><code>#ifWinActived GTARP CRMP
pause
way = C:\Users\Anton\Documents\GTA San Andreas User Files\SAMP\chatlog.txt
FileDelete %way%
Loop 999999999
{
If (IfInString, file, Добро пожаловать на GTA RolePlay)
{ 
Sleep 10000 
SendInput, [Пароль]
FileDelete %way%
Sleep 1500 
SendInput {Enter} 
FileDelete %way% 
sleep 1500 
SendInput {down down} 
FileDelete %way%
sleep 1000 
SendInput {down up}
FileDelete %way%
sleep 1500 
SendInput {down down} 
FileDelete %way%
sleep 1000 
SendInput {down up}
FileDelete %way%
sleep 1000 
SendInput {Enter}
FileDelete %way% 
Sleep 1500 
SendInput {F6}/clist 24{Enter} 
FileDelete %way%
Sleep 1500 
SendInput {F6}/b 888{Enter} 
FileDelete %way%
} 
else If (IfInString, file, (( [Ник]: 888 )))
{
loop 9999999   
{
  SendInput {Escape down}
sleep 1
  Send {Escape up}
sleep 1000
SendInput {Escape down}
sleep 1
  Send {Escape up}
sleep 5000
FileRead, file, %way%
}
}
else if (IfInString, file, Server closed the connection.)
{
Sleep 1500 
SendInput {F6}/q{Enter}  
FileDelete %way%
sleep 7000 
DllCall(&quot;SetCursorPos&quot;, int, 800, int, 264)
 Sendinput {LButton Down}
sleep 1
 Sendinput {LButton Up}
}
return
F10:: pause</code></pre></div><p><strong>nathantaft98</strong></p>]]></content>
			<author>
				<name><![CDATA[Anton_8237]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=40351</uri>
			</author>
			<updated>2019-08-23T16:22:42Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=135831#p135831</id>
		</entry>
</feed>
