<?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="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7977&amp;type=atom" />
	<updated>2013-01-17T04:51:54Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7977</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68590#p68590" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>evga пишет:</cite><blockquote><p>работает.<br />Но, работает и дальше.<br />Кнопку нажимает, на x,y и потом её нажимает всю игру.<br />Как бы это убрать?</p></blockquote></div><p>Видимо, надо убрать строчку SetTimer, Accepter, 2012.<br /></p><div class="quotebox"><blockquote><p>а почему controlclick скорее всего работать не будет?</p></blockquote></div><p>А фиг его знает. Попробуйте, может, и будет.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2013-01-17T04:51:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68590#p68590</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68588#p68588" />
			<content type="html"><![CDATA[<p>работает.<br />Но, работает и дальше.<br />Кнопку нажимает, на x,y и потом её нажимает всю игру.<br />Как бы это убрать?</p>]]></content>
			<author>
				<name><![CDATA[evga]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29432</uri>
			</author>
			<updated>2013-01-17T04:02:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68588#p68588</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68557#p68557" />
			<content type="html"><![CDATA[<p>а почему controlclick скорее всего работать не будет?</p>]]></content>
			<author>
				<name><![CDATA[evga]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29432</uri>
			</author>
			<updated>2013-01-16T11:16:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68557#p68557</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68533#p68533" />
			<content type="html"><![CDATA[<p>теперь без ошибок.<br />Дома проверю.</p>]]></content>
			<author>
				<name><![CDATA[evga]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29432</uri>
			</author>
			<updated>2013-01-16T08:05:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68533#p68533</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68532#p68532" />
			<content type="html"><![CDATA[<p>Жалуется на строчку Menu, tray, add, Exit. Уберите её и ошибки не будет. Чтобы скрипт не закрывался, добавьте в начало #Persistent</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2013-01-16T07:33:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68532#p68532</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68530#p68530" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
#SingleInstance force

Menu, tray, add, Exit


accept:
gojoin:=!gojoin
if gojoin
{
x:=A_ScreenWidth*.42
y:=A_ScreenHeight*.45
gosub, Accepter
sleep 100
SetTimer, Accepter, 2012
}
else
{
ToolTip
SetTimer, Accepter, off
}
return

Accepter:
ifWinActive,DOTA 2
{
ToolTip, Dota2 Accepter is active`nPress %accepter% to deactivate
MouseMove,x,y
sleep,1
Click
}
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[evga]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29432</uri>
			</author>
			<updated>2013-01-16T06:52:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68530#p68530</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68529#p68529" />
			<content type="html"><![CDATA[<p>Ну так покажите код, который сейчас запускаете.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2013-01-16T06:47:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68529#p68529</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68528#p68528" />
			<content type="html"><![CDATA[<p>пробовал убирать menu только exit оставил.<br />Убрал gui.<br />Всё равно ошибка.<br />Аж бесит уже. Не могу понять в чём сложность. <br />Нужно то нажать на кнопку &quot;Accept/Принять&quot;.</p>]]></content>
			<author>
				<name><![CDATA[evga]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29432</uri>
			</author>
			<updated>2013-01-16T06:34:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68528#p68528</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68527#p68527" />
			<content type="html"><![CDATA[<p>Убирайте. Нажатие в неактивном окне — команда ControlClick. Работать скорее всего не будет, но какой-то шанс есть.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2013-01-16T06:20:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68527#p68527</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68524#p68524" />
			<content type="html"><![CDATA[<p>Я хочу убрать и info и всё остальное.<br />Оставить нажатие в окне. Активно или нет скрипту неважно.<br />А всякие примочки about и прочая ерунда мне совсем не нужна.</p>]]></content>
			<author>
				<name><![CDATA[evga]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29432</uri>
			</author>
			<updated>2013-01-16T05:09:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68524#p68524</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68523#p68523" />
			<content type="html"><![CDATA[<p>Каждый раз при нажатии на пункт инфо выполняется процедура инфо и команда Gui, Add, Hotkey, vaccepter пытается добавить в окно ещё один контрол с переменной vaccess, а там уже есть один такой. Gui нужно создать один раз, например, в начале скрипта, а потом только показывать и прятать командами Gui, Show и Gui, Hide.</p>]]></content>
			<author>
				<name><![CDATA[YMP]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=81</uri>
			</author>
			<updated>2013-01-16T04:48:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68523#p68523</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68521#p68521" />
			<content type="html"><![CDATA[<p>Что я тогда делаю не так?<br />Копирую в блокнот, сохраняю. И ошибка.<br />И сразу 2 вопрос, как сделать чтобы и на инактивное окно это работало?</p>]]></content>
			<author>
				<name><![CDATA[evga]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29432</uri>
			</author>
			<updated>2013-01-16T04:12:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68521#p68521</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68506#p68506" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Не работает.</p></blockquote></div><p>Работает. На новой.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2013-01-15T08:07:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68506#p68506</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Нажатие кнопки в окне.]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=68503#p68503" />
			<content type="html"><![CDATA[<p>появляется окно с двумя кнопками. согласен-не согласен.<br />Необходимо нажать на согласен. Не важно активно окно либо свёрнуто.<br />На активное окно я что-то написал\подглядел.<br /></p><div class="codebox"><pre><code>; &lt;COMPILER: v1.0.48.5&gt;
#SingleInstance force
Menu, tray, NoStandard
Menu, tray, add, Info
Menu, tray, Default, Info
Menu, tray, add, About
Menu, tray, add, Rosh
Menu, tray, add, Exit
IniRead, accepter, %A_temp%\d2a.ini, Config, Accepter, F11
Hotkey,%accepter%, accept
return

accept:
gojoin:=!gojoin
if gojoin
{
x:=A_ScreenWidth*.42
y:=A_ScreenHeight*.45
gosub, Accepter
sleep 100
SetTimer, Accepter, 2012
}
else
{
ToolTip
SetTimer, Accepter, off
}
return

Accepter:
ifWinActive,DOTA 2
{
ToolTip, Dota2 Accepter is active`nPress %accepter% to deactivate
MouseMove,x,y
sleep,1
Click
}
return

Info:
gui, font, s10 w500
Gui, Add, Text, x5 y5 h30, Press
Gui, Add, Hotkey, vaccepter x55 y5 w50 h30 , %accepter%
Gui, Add, Text, x105 y5, to activate/deactivate
Gui, Add, Button, gsaveconfig x0 y35 w300 h30,Save
Gui, Show, w300 h65,Dota2 Accepter v1
return

saveconfig:
Hotkey, %accepter%, Off
gui, submit
IniWrite,%accepter%, %A_temp%\d2a.ini, Config, Accepter
Hotkey,%accepter%, accept
gui, destroy
return

GuiEscape:
gui, destroy
return
Exit:
ExitApp
return

About:
Run http://www.playdota.com/forums/blog.php?b=146942
return

Rosh:
Run http://rosh.likesyou.org
return
</code></pre></div><p>Но это для старой версии. Необходимо для новой.<br />Не работает.<br />Error: The same variable cannot be used for more than one control<br />Specifically: vaccepter</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Line#<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...<br />--&gt;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 043: Gui,font,s10 w500&nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;...<br />Подскажите что я делаю не так.<br />И как сделать на последнюю версию ahk.</p>]]></content>
			<author>
				<name><![CDATA[evga]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=29432</uri>
			</author>
			<updated>2013-01-15T07:29:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=68503#p68503</id>
		</entry>
</feed>
