<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Не ищет координаты кнопки.]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=16407&amp;type=atom" />
	<updated>2021-06-06T00:05:48Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=16407</id>
		<entry>
			<title type="html"><![CDATA[AHK: Не ищет координаты кнопки.]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=148301#p148301" />
			<content type="html"><![CDATA[<p>Приветствую. Код ниже, не ищет координаты. Не пойму в чём проблема(<br /></p><div class="codebox"><pre><code>#SingleInstance Force
#NoEnv
hWnd := WinExist(&quot;Окно игры&quot;)
Gui WinPicture: +HwndGuiH -Caption -Border +AlwaysOnTop +ToolWindow +Owner%hWnd% +Lastfound +E0x20 ; +Disabled
Gui WinPicture: Margin, 0, 0
Gui WinPicture: Color, 0
WinSet TransColor, 0 200
Gui WinPicture: Add, Button,, My Button
Gui WinPicture: Show, NA
Return

Esc::ExitApp

#If WinActive(&quot;ahk_id&quot; hWnd)
*LButton::
	WinGetPos, guiX, guiY, guiWidth, guiHeight, % &quot;ahk_id&quot; GuiH
	CoordMode, Mouse, Screen
	MouseGetPos, cursorX, cursorY, cursorWin
	If (cursorX&gt;guiX and cursorX&lt;guiX+guiWidth and cursorY&gt;guiY and cursorY&lt;guiY+guiHeight) {
		SetTimer, Action, -1
	} Else {
		Send {LButton Down}
		ToolTip % &quot;cursorX= &quot; cursorX &quot;, cursorY= &quot; cursorY &quot;`nguiX= &quot; guiX &quot;, guiY= &quot; guiY
	}
Return
*~LButton Up::Return
#If

Action:
	MsgBox
Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Q1x]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=41614</uri>
			</author>
			<updated>2021-06-06T00:05:48Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=148301#p148301</id>
		</entry>
</feed>
