<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Не корректно работает скрипт с выводом нужного текста из файла]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=10468&amp;type=atom" />
	<updated>2015-03-03T19:37:47Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=10468</id>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92219#p92219" />
			<content type="html"><![CDATA[<p>Кстати, благодаря вам всё-таки доработал код. Вот так работает полностью:</p><div class="codebox"><pre><code>
rctrl::
   FileRead, file, C:\Users\Maxim\Documents\GTA San Andreas User Files\SAMP\chatlog.txt
   ip := RegExReplace(file, &quot;s).* IP \[([0-9\.]+)].*&quot;, &quot;$1&quot;)
   ToolTip, Найденный IP %ip%   ; для демонстрации, можно закомментировать
   Clipboard := ip
   SendInput {F6}/banip {LControl Down}{sc02F}{LControl Up}{enter}
   return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ICEICEONE]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32911</uri>
			</author>
			<updated>2015-03-03T19:37:47Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92219#p92219</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92218#p92218" />
			<content type="html"><![CDATA[<p>Огромное спасибо, пусть и полностью проблему решить не удалось, но все равно <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[ICEICEONE]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32911</uri>
			</author>
			<updated>2015-03-03T19:34:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92218#p92218</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92217#p92217" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>rctrl::
   FileRead, file, C:\Users\Maxim\Documents\GTA San Andreas User Files\SAMP\chatlog.txt
   ip := RegExReplace(file, &quot;s).* IP \[([0-9\.]+)].*&quot;, &quot;$1&quot;)
   ToolTip, Найденный IP %ip%   ; для демонстрации, можно закомментировать
   Clipboard := ip
   return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-03-03T19:29:13Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92217#p92217</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92216#p92216" />
			<content type="html"><![CDATA[<p>Тогда можно ли изменить код таким образом, чтобы найденный ип копировался в буфер обмена? Т.е. далее я уже вручную вставлю его в чат. Заранее благодарю, думаю это займет не много времени.</p>]]></content>
			<author>
				<name><![CDATA[ICEICEONE]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32911</uri>
			</author>
			<updated>2015-03-03T19:24:44Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92216#p92216</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92215#p92215" />
			<content type="html"><![CDATA[<p>Значит, дело в окне чата. Здесь не подскажу, т. к. не могу проэкспериментировать.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-03-03T19:21:02Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92215#p92215</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92214#p92214" />
			<content type="html"><![CDATA[<p>Вставляем в чат. F6 открывает окно с чатом.</p>]]></content>
			<author>
				<name><![CDATA[ICEICEONE]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32911</uri>
			</author>
			<updated>2015-03-03T19:18:52Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92214#p92214</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92213#p92213" />
			<content type="html"><![CDATA[<p>Если находит нормально, проблема не в коде. А куда вставляем-то, в обычное окно командной строки? У меня всё вставляется нормально.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-03-03T19:15:39Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92213#p92213</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92210#p92210" />
			<content type="html"><![CDATA[<p>Всё та же песня, снова &quot;/banip &quot;.<br />К слову, ранее использовал в этой же игре скрипт со вставкой текста, тогда он вставлял текст из буфера обмена после ряда операций. Текст вставлялся нормально.</p><p>Кстати, ип AHK находит верно.</p>]]></content>
			<author>
				<name><![CDATA[ICEICEONE]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32911</uri>
			</author>
			<updated>2015-03-03T18:59:44Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92210#p92210</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92209#p92209" />
			<content type="html"><![CDATA[<p>Просто запустить код, как есть, и нажать RCtrl, когда активно окно, куда должно вставляться.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-03-03T18:58:02Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92209#p92209</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92207#p92207" />
			<content type="html"><![CDATA[<p>Чтобы это реализовать, нужно вставить полный код вашего поста? Извиняюсь конечно за своё нубство, но не могу понять, как заставить код работать иначе).</p>]]></content>
			<author>
				<name><![CDATA[ICEICEONE]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32911</uri>
			</author>
			<updated>2015-03-03T18:52:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92207#p92207</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92206#p92206" />
			<content type="html"><![CDATA[<p>А если, как в моём коде, считывать текст не из файла, а из переменной, тогда получается или нет?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-03-03T18:50:35Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92206#p92206</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92205#p92205" />
			<content type="html"><![CDATA[<p>Все равно категорически отказывается вставлять ип.<br />&quot;/banip пробел&quot;<br />Может быть какая-то проблема в кодировке? Сама и суть, что у других администраторов всё в порядке.</p>]]></content>
			<author>
				<name><![CDATA[ICEICEONE]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32911</uri>
			</author>
			<updated>2015-03-03T18:49:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92205#p92205</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92204#p92204" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>file =   ; содержание файла в переменной file
(
[14:26:34] {FFFFFF}SA-MP {B9C9BF}0.3z {FFFFFF}Started
[14:26:34] Connecting to 5.254.104.120:7777...
[14:26:35] Connected. Joining the game...
[14:26:37] Connected to {B9C9BF}Samp-Rp.Ru | Server: 10 | Client: 0.3z
[14:26:37]  Добро пожаловать на Samp Role Play
[14:26:45] Server closed the connection.
[21:37:36]  Администратор: NickName забанил NickName. Причина: cheat
[21:37:36]     Nik [NickName]   R-IP [192.168.0.2]   L-IP [192.168.0.2]   IP [192.168.0.2]
[21:40:36]  Администратор: NickName забанил NickName. Причина: cheat
[21:40:36]     Nik [NickName]   R-IP [192.168.0.1]   L-IP [192.168.0.1]   IP [192.168.0.1]
[21:41:50]   ещё какой-то текст
[21:42:50]   ещё какой-то текст
)

rctrl::
;  раскомментировать следующую строчку, когда содержание считывается из файла
;  FileRead, file, C:\Users\Maxim\Documents\GTA San Andreas User Files\SAMP\chatlog.txt
   ip := RegExReplace(file, &quot;s).* IP \[([0-9\.]+)].*&quot;, &quot;$1&quot;)
   ToolTip, Найденный IP %ip%   ; для демонстрации, можно закомментировать
   SendInput {F6}/banip %ip%{enter}
   return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-03-03T18:27:15Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92204#p92204</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92202#p92202" />
			<content type="html"><![CDATA[<p>Записей несколько, определяет по признаку самой последней записи, т.е. ип последнего заблокированного человека.<br />Лог обновляется постоянно. Скрипт начинает работу после забаненного человека, т.е. когда уже есть ип в логе.</p>]]></content>
			<author>
				<name><![CDATA[ICEICEONE]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=32911</uri>
			</author>
			<updated>2015-03-03T17:55:40Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92202#p92202</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Не корректно работает скрипт с выводом нужного текста из файла]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=92200#p92200" />
			<content type="html"><![CDATA[<p>В момент обращения скрипта к логу там уже есть запись с IP? Сколько там таких записей? Если несколько, по какому признаку определить нужную?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-03-03T17:47:53Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=92200#p92200</id>
		</entry>
</feed>
