<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: PixelGetColor]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=16836</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=16836&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: PixelGetColor».]]></description>
		<lastBuildDate>Sun, 19 Dec 2021 14:59:16 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[AHK: PixelGetColor]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=151303#p151303</link>
			<description><![CDATA[<p>Привет, подскажите как мне использовать функцию if с PixelGetColor.<br />Вот мой примерный код.<br /></p><div class="codebox"><pre><code>
; &lt;COMPILER: v1.1.33.10&gt;
#NoEnv



txtNotFrozen := &quot;(Hold Ctrl or Shift to suspend updates)&quot;
txtFrozen := &quot;(Updates suspended)&quot;




SendMode Input
SetWorkingDir %A_ScriptDir%
SetBatchLines, -1
CoordMode, Pixel, Screen
DetectHiddenWindows, On
SetTitleMatchMode, 2
Gui,1:+AlwaysOnTop

Gui, New, hwndhGui AlwaysOnTop Resize MinSize

Gui, Color, ffff66, 00ffff
Gui, Font, bold,
Gui, Font, ffff66

Gui, Add, Edit, x12 y30 w120 h20 vPressAD gTime_all,
Gui, Add, Edit, x12 y60 w120 h20 vClick1 gTime_all,
Gui, Add, Edit, x12 y90 w120 h20 vbind1 gTime_all,
Gui, Add, Edit, x12 y120 w120 h20 vbind2 gTime_all,
Gui, Add, Edit, x12 y150 w120 h20 vbind3 gTime_all,
Gui, Add, Text, x12 y250 w170 h25 , Press F7 to start
Gui, Add, Text, x12 y265 w170 h25 , Press F10 to pause/resume
Gui, Add, Text, x12 y280 w170 h25 , Press F12 to close
Gui, Add, Edit, x12 y310 w120 h20 vPid gTime_all,
Gui, Add, Text, x142 y313 w100 h25 , Write your PID
Gui, Add, Text, x250 y300 w300 h25 r4 ReadOnly -Wrap vCtrl_Title
Gui, Show, w485 h350, script1


return
GuiClose:
ExitApp

Time_all:
Gui, Submit, NoHide
F7::

game := &quot;ahk_pid &quot; Pid

MouseGetPos, MouseX, MouseY
PixelGetColor, color, %MouseX%, %MouseY%
if (TRX = 0x2B2B2B)
	Loop
	{
	SetKeyDelay, 50, 50
	ControlSend,, {/}, %game%
	sleep 100
	ControlSend,, {Enter}, %game%
	sleep 100
	} 
 



Loop
{
SetKeyDelay, 50, 50
ControlSend,, {%Click1% down}, %game%
sleep 100
ControlSend,, {%Click1% up}, %game%
sleep 100
}
F10::Pause
Suspend
Return
F12::ExitApp
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (baklan18)]]></author>
			<pubDate>Sun, 19 Dec 2021 14:59:16 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=151303#p151303</guid>
		</item>
	</channel>
</rss>
