<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Исполнение скрипта в определенной области экрана]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=12986</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=12986&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Исполнение скрипта в определенной области экрана».]]></description>
		<lastBuildDate>Wed, 13 Sep 2017 15:12:42 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119319#p119319</link>
			<description><![CDATA[<p><strong>svoboden</strong> огромное спасибо!</p>]]></description>
			<author><![CDATA[null@example.com (CDLebo)]]></author>
			<pubDate>Wed, 13 Sep 2017 15:12:42 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119319#p119319</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119305#p119305</link>
			<description><![CDATA[<div class="codebox"><pre><code>1::
timer = 50
Global x1 := 100, y1 := 100, x2 := 450, y2 := 500

SetTimer, CheckTimeIdle, % timer
return

CheckTimeIdle:
CoordMode, Mouse
    MouseGetPos, x, y
    if !(x &lt; x1 || x &gt; x2 || y &lt; y1 || y &gt; y2)
        Send +{Click}
	    if (x &lt; x1 || x &gt; x2 || y &lt; y1 || y &gt; y2)
    SetTimer, CheckTimeIdle, off
return</code></pre></div><div class="codebox"><pre><code>1::
Loop {
    Sleep, 10
    Gosub, Label
    GetKeyState, state, 1, P
    if state = U
    break
}
return

Label:
sleep 50
CoordMode, Mouse
x1 := 100, y1 := 100, x2 := 450, y2 := 500
    MouseGetPos, x, y
    if !(x &lt; x1 || x &gt; x2 || y &lt; y1 || y &gt; y2)
        Send +{Click}
	    if (x &lt; x1 || x &gt; x2 || y &lt; y1 || y &gt; y2)
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Wed, 13 Sep 2017 08:00:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119305#p119305</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119304#p119304</link>
			<description><![CDATA[<p>Очень хороший человек помог мне и сделал скрипт, НО хотелось бы кое-что подредактировать. В Данный момент при зажатии кнопки скрипт проверяет, находится ли он в зоне действий и если находится, то начинает жать Shift+LCM. Единственное НО это то, что в момент когда он зашел в зону действий для него эта зона становится всем экраном, тобишь рамки спадают и это действие исполняется в любой части экрана, пока я не отожму кнопку и не нажму заново. Помогите сделать правильно. Спасибо.<br /></p><div class="codebox"><pre><code>#IF needcoord(1100,578,1470,1005)
$V::

Loop
{
if not GetKeyState(&quot;V&quot;, &quot;P&quot;)
break
Send +{Click}
}
return
#IF

needcoord(x1,y1,x2,y2) {
    MouseGetPos, x, y
    if !(x &lt; x1 || x &gt; x2 || y &lt; y1 || y &gt; y2)
        Return 999999 
}
esc::exitapp</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (CDLebo)]]></author>
			<pubDate>Wed, 13 Sep 2017 04:04:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119304#p119304</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119213#p119213</link>
			<description><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>Зачем таймер, если по факту нажатия надо?</p></blockquote></div><p>Ну, это как-то совсем просто. Можно было бы пользователю не задавать такой вопрос, а самому найти ответ.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Sat, 09 Sep 2017 17:55:01 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119213#p119213</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119212#p119212</link>
			<description><![CDATA[<p>Не знаю, я подумал, ему надо без активации на кнопку. Вот примерные координаты его вопроса Global x1 := 100, y1 := 100, x2 := 450, y2 := 500, если пользователь сам не подобрал их.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Sat, 09 Sep 2017 17:53:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119212#p119212</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119211#p119211</link>
			<description><![CDATA[<p>Поиск в помощь:<br /></p><ul><li><p><a href="http://forum.script-coding.com/viewtopic.php?id=10984">AHK: Событие при клике в заданных координатах окна</a>;</p></li><li><p><a href="http://forum.script-coding.com/viewtopic.php?id=9475">AHK: Заблокировать клики мышью в определенных координатах окна</a>.</p></li></ul>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Sat, 09 Sep 2017 17:31:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119211#p119211</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119210#p119210</link>
			<description><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?pid=81710#p81710">http://forum.script-coding.com/viewtopi … 710#p81710</a><br />Зачем таймер, если по факту нажатия надо?<br /></p><div class="codebox"><pre><code>#IF needcoord(0,0,100,100)
Shift::MsgBox,,,,0.1
#IF

needcoord(x1,y1,x2,y2) {
    MouseGetPos, x, y
    if !(x &lt; x1 || x &gt; x2 || y &lt; y1 || y &gt; y2)
        Return 1 
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Sat, 09 Sep 2017 17:29:27 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119210#p119210</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119203#p119203</link>
			<description><![CDATA[<p>Подберите. Так Global x1 := 0, y1 := 0, x2 := 200, y2 := 200 определяет верхний левый угол.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Sat, 09 Sep 2017 16:20:43 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119203#p119203</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119201#p119201</link>
			<description><![CDATA[<p><strong>svoboden</strong><br />Спасибо за помощь, попробую использовать этот скрипт. Подскажи как можно определить нужные мне координаты?</p>]]></description>
			<author><![CDATA[null@example.com (CDLebo)]]></author>
			<pubDate>Sat, 09 Sep 2017 16:12:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119201#p119201</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119197#p119197</link>
			<description><![CDATA[<p>Вот вариант:<br /></p><div class="codebox"><pre><code>#Persistent
timer = 50
H = 4

SetTimer, CheckTimeIdle, % timer
SetTimer, TimeIdle, % timer
return

CheckTimeIdle:
H--
CoordMode, Mouse
Global x1 := 0, y1 := 0, x2 := 300, y2 := 300
    MouseGetPos, x, y
    if !(x &lt; x1 || x &gt; x2 || y &lt; y1 || y &gt; y2)
        send +{Click}
    if H = 0
    SetTimer, CheckTimeIdle, off
    SetTimer, CheckTimeIdle, off
return

TimeIdle:
    SetTimer, CheckTimeIdle, On
return</code></pre></div><p>Тут Global x1 := 0, y1 := 0, x2 := 300, y2 := 300 сам напиши координаты нужной области, а здесь timer = 50 устанавливаешь скорость кликов.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Sat, 09 Sep 2017 15:37:09 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119197#p119197</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Исполнение скрипта в определенной области экрана]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=119196#p119196</link>
			<description><![CDATA[<p>Здравствуйте! Есть скрипт, который при зажатии определенной кнопки делает следующее: Зажать Shift и быстро нажимать ЛКМ. Хочу сделать чтоб этот скрипт действовал не во всей области экрана, а в определенно. Пример: Я зажал кнопку исполнения скрипта, скрипт начинает действие, но за определенной зоной он не делает никаких нажатий, а как только мышка зашла в зону действий он начинает зажимать Shift и быстро нажимать ЛКМ. Прошу помощи в создании такого скрипта. Всем заранее спасибо!<br /><span class="postimg"><img src="https://pp.userapi.com/c638631/v638631396/62b89/TZfG9lEPBFU.jpg" alt="https://pp.userapi.com/c638631/v638631396/62b89/TZfG9lEPBFU.jpg" /></span> Красная зона - зона, в которой будет происходить действие скрипта.<br />Сам скрипт:<br /></p><div class="codebox"><pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

Numpad2::ExitApp

*x::
   While GetKeyState(&quot;x&quot;, &quot;P&quot;)
   {
   send {LShift down}
      Click
      Sleep, 50 
	  send {LShift up}
   }
   Return
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (CDLebo)]]></author>
			<pubDate>Sat, 09 Sep 2017 14:42:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=119196#p119196</guid>
		</item>
	</channel>
</rss>
