<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Совместной использование Loop'a и GUI.]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11284&amp;type=atom" />
	<updated>2016-02-02T18:13:26Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11284</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Совместной использование Loop'a и GUI.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100805#p100805" />
			<content type="html"><![CDATA[<p>Почитайте про команду return, потом пройдитесь по коду, и посмотрите, какая не на месте.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-02-02T18:13:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100805#p100805</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Совместной использование Loop'a и GUI.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100803#p100803" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>#include %A_ScriptDir%\SAMP.ahk

CL = %A_MyDocuments%\GTA San Andreas User Files\SAMP\chatlog.txt  
StringCaseSense, Locale
FileDelete, %CL%

delfunc()
{
	FileDelete %A_ScriptDir%\carlist.ahk
}

createfunc()
{
	FileAppend,
(
#include %A_ScriptDir%\SAMP.ahk
:?:/respawnbike::`n
), %A_ScriptDir%\carlist.ahk
}

closefunc()
{
	FileAppend,
(
return
), %A_ScriptDir%\carlist.ahk
}

Gui, Add, Tab2,, Меню|Помощь
Gui, Add, Button, gcreatefunc, Начать создание нового списка
Gui, Add, Button, gclosefunc, Закончить создание списка
Gui, Add, Button, gdelfunc, Удалить список.
Gui, Tab, 2
Gui, Add, Text,, Кек
Gui, Tab, 3
Gui, Add, Edit, vMyEdit r5  ; r5 means 5 rows tall.
Gui, Tab  ; i.e. subsequently-added controls will not belong to the tab control.
Gui, Add, Button, ghide xm, Cвернуть  ; xm puts it at the bottom left corner.
Gui, Add, Button, gclose xm, Закрыть  ; xm puts it at the bottom left corner.
Gui, Show
return
hide()
{
	Gui, cancel
}
close()
{
	ExitApp
}

Loop
{
        Loop,Read, %CL%
        {
                adminid := getId()
                Line := A_LoopReadLine
				timestamp := A_LoopReadLine
                RegExMatch(Line, &quot;`[[0-9]+:[0-9]+:[0-9]+`] &quot;, timestamp)
                Line := RegExReplace(Line, &quot;`[[0-9]+:[0-9]+:[0-9]+`] &quot;, &quot;&quot;)
                RegExMatch(Line, &quot;`[[0-9]+`]&quot;, ID)
                StringTrimLeft, ID, ID, 1
                StringTrimRight, ID, ID, 1
				
				regExMatch(timestamp, &quot;:[0-9]+:&quot;, timestamp)
				timestamp := RegExReplace(timestamp, &quot;:&quot;, &quot;&quot;)
		
		
			IfInString, A_LoopReadLine, Автомобиль
			IfInString, A_LoopReadLine, создан
                {
					RegExMatch(Line, &quot;[0-9]+&quot;, carid)
					FileAppend,
					(
sendChatMessage(&quot;/respawn %carid%&quot;)`n
sleep 350`n
					), %A_ScriptDir%\carlist.ahk		
                }
        }
 FileDelete, %CL%
 sleep 1000  
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Bek1zo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33210</uri>
			</author>
			<updated>2016-02-02T18:06:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100803#p100803</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Совместной использование Loop'a и GUI.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100798#p100798" />
			<content type="html"><![CDATA[<p>А как вы пробовали? Приведите код.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2016-02-02T14:36:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100798#p100798</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Совместной использование Loop'a и GUI.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=100795#p100795" />
			<content type="html"><![CDATA[<p>Столкнулся с такой проблемой, что при наличие GUI невозможно запустить loop. Работает что то одно в зависимости от месторасположение кода. Возможно как то решить эту проблему?</p>]]></content>
			<author>
				<name><![CDATA[Bek1zo]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33210</uri>
			</author>
			<updated>2016-02-02T14:22:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=100795#p100795</id>
		</entry>
</feed>
