<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; Samp: скрипт который быстро будет нажимать кнопку N в игре.]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=12778&amp;type=atom" />
	<updated>2017-06-30T17:28:37Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=12778</id>
		<entry>
			<title type="html"><![CDATA[Re: Samp: скрипт который быстро будет нажимать кнопку N в игре.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=116934#p116934" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>SetBatchLines -1
SetKeyDelay -1, -1

F1::
	KeyWait F1
	включен := Not включен
	If включен
		While !GetKeyState(&quot;F1&quot;)
		{
			Send {vk4E Down}
			pSleep.do(3)
			Send {vk4E Up}
		}
Return


class pSleep
{
	static F:=pSleep.getQPF()
	do(t) {
		DllCall(&quot;QueryPerformanceCounter&quot;, &quot;Int64P&quot;, sT1)
		crit:=A_IsCritical
		Critical On
		res:=pSleep.getTimerResolution(),dt:=0
		if (t&gt;res) ; Do regular sleep before qpc loop, if t is long enough.
			(DllCall(&quot;Sleep&quot;, &quot;Int&quot;, t-res), DllCall(&quot;QueryPerformanceCounter&quot;, &quot;Int64P&quot;, sT2), dt:=(sT2-sT1)*1000/pSleep.F)
		t-=dt, DllCall(&quot;QueryPerformanceCounter&quot;, &quot;Int64P&quot;, loopStart), loopTic:=loopStart
		while (loopTic-loopStart&lt;t*pSleep.F/1000)
			DllCall(&quot;QueryPerformanceCounter&quot;, &quot;Int64P&quot;, loopTic)
		Critical % crit
		return
	}
	getTimerResolution() {
		DllCall(&quot;ntdll.dll\NtQueryTimerResolution&quot;, &quot;UPtr*&quot;, MinimumResolution, &quot;UPtr*&quot;, MaximumResolution, &quot;UPtr*&quot;, CurrentResolution)
		return Ceil(CurrentResolution/10000) ; Resolutions are reported as 100-nanoseconds
	}
	getQPF() {
		DllCall(&quot;QueryPerformanceFrequency&quot;, &quot;Int64P&quot;, F)
		return F
	}
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2017-06-30T17:28:37Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=116934#p116934</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samp: скрипт который быстро будет нажимать кнопку N в игре.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=116929#p116929" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong> , Спасибо! Скрипт начал работать более стабильно, но скорости не прибавилось.</p>]]></content>
			<author>
				<name><![CDATA[artur_dr]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38604</uri>
			</author>
			<updated>2017-06-30T16:23:38Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=116929#p116929</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samp: скрипт который быстро будет нажимать кнопку N в игре.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=116927#p116927" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong> Простите за оформление, исправлюсь.</p>]]></content>
			<author>
				<name><![CDATA[artur_dr]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38604</uri>
			</author>
			<updated>2017-06-30T16:09:29Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=116927#p116927</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samp: скрипт который быстро будет нажимать кнопку N в игре.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=116925#p116925" />
			<content type="html"><![CDATA[<p><strong>stealzy</strong> тоже не работает, спасибо что пытались помочь!)</p>]]></content>
			<author>
				<name><![CDATA[artur_dr]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38604</uri>
			</author>
			<updated>2017-06-30T16:06:51Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=116925#p116925</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samp: скрипт который быстро будет нажимать кнопку N в игре.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=116924#p116924" />
			<content type="html"><![CDATA[<p><strong>Drygok</strong><br />Не работает в игре. Будто не видит такие нажатия.</p>]]></content>
			<author>
				<name><![CDATA[artur_dr]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38604</uri>
			</author>
			<updated>2017-06-30T16:03:55Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=116924#p116924</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samp: скрипт который быстро будет нажимать кнопку N в игре.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=116922#p116922" />
			<content type="html"><![CDATA[<p><strong>Drygok</strong>, ну вот если не нравится, то сначала потребуйте от пользователя нормального оформления. Отвечая в этой теме, вы соглашаетесь с тем, что оформление вас устраивает.</p>]]></content>
			<author>
				<name><![CDATA[belyankin12]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=34408</uri>
			</author>
			<updated>2017-06-30T16:02:41Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=116922#p116922</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Samp: скрипт который быстро будет нажимать кнопку N в игре.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=116921#p116921" />
			<content type="html"><![CDATA[<p>Оформление, конечно, м-да. <br /></p><div class="codebox"><pre><code>!1::
loop
{
SendInput, {vk4E}
}</code></pre></div><p>Так чем не подходит?</p>]]></content>
			<author>
				<name><![CDATA[Drygok]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=37379</uri>
			</author>
			<updated>2017-06-30T15:43:39Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=116921#p116921</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Samp: скрипт который быстро будет нажимать кнопку N в игре.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=116916#p116916" />
			<content type="html"><![CDATA[<p>Драсьте, хочу написать скрипт, который будет при нажати альт+1, или другой комбинации очень быстро флудить кнопкой N ( быстро нажимать ). Пытался сам, но скрипт работал медленно, с задержками и перерывами.</p><div class="codebox"><pre><code>!1::
loop
{
SendInput, {vk4E Down}
sleep 1
SendInput, {vk4E up}
sleep 1
SendInput, {vk4E Down}
sleep 1
SendInput, {vk4E up}
sleep 1
SendInput, {vk4E Down}
sleep 1
SendInput, {vk4E up}
sleep 1
SendInput, {vk4E Down}
sleep 1
SendInput, {vk4E up}
retutn 
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[artur_dr]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=38604</uri>
			</author>
			<updated>2017-06-30T10:16:41Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=116916#p116916</id>
		</entry>
</feed>
