<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Закрыть alertBox в Firefox]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10831&amp;type=atom" />
	<updated>2015-07-29T21:42:23Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10831</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96124#p96124" />
			<content type="html"><![CDATA[<p>Ясно, а я то подумал что, уж всё слишком просто. <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2015-07-29T21:42:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96124#p96124</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96122#p96122" />
			<content type="html"><![CDATA[<p>Нет. Я про это:<br /></p><div class="codebox"><pre><code>DetectHiddenWindows, On
WinExist(&quot;ahk_class µTorrent4823DF041B09&quot;)
ControlGet, hwnd, hwnd,, ToolbarWindow322

PressToolBarButton(hwnd, 10)

PressToolBarButton(hwnd, ButtonID)
{
   AccObj := AccObjectFromWindow(hwnd, OBJID_CLIENT := 0xFFFFFFFC)
   if !IsObject(AccObj)  {
      MsgBox, Не удалось получить AccObj
      Return
   }
   AccObj.accDoDefaultAction(ButtonID)
}

AccObjectFromWindow(hWnd, idObject = 0)
{
   static h
   !h ? h := DllCall(&quot;LoadLibrary&quot;,&quot;Str&quot;,&quot;oleacc&quot;,&quot;Ptr&quot;)
   If   DllCall(&quot;oleacc\AccessibleObjectFromWindow&quot;, &quot;Ptr&quot;, hWnd, &quot;UInt&quot;, idObject&amp;=0xFFFFFFFF
      , &quot;Ptr&quot;, -VarSetCapacity(IID,16)+NumPut(idObject==0xFFFFFFF0?0x46000000000000C0:0x719B3800AA000C81
      ,NumPut(idObject==0xFFFFFFF0?0x0000000000020400:0x11CF3C3D618736E0,IID,&quot;Int64&quot;),&quot;Int64&quot;), &quot;Ptr*&quot;, pacc)=0
   Return   ComObjEnwrap(9,pacc,1)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-07-29T21:26:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96122#p96122</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96119#p96119" />
			<content type="html"><![CDATA[<p>Как я понял ты про такую запись. </p><div class="codebox"><pre><code>Send {AppsKey}{down 10}{enter}</code></pre></div><p> По ID элемента, верно?</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2015-07-29T18:45:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96119#p96119</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96118#p96118" />
			<content type="html"><![CDATA[<p>Через Acc. В 7 посте ссылка.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-07-29T18:29:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96118#p96118</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96116#p96116" />
			<content type="html"><![CDATA[<p>Спасибо, я кое что поменял - всё работает у ТС.</p><p>Возник дополнительный вопрос по теме.</p><p>Как отработать кнопку включение прокси после ошибки в FireFox?</p><p>Вот скриншоты и скрипт(вопрос по <strong>фрагменту №2</strong>).<br />Скриншоты только по фрагменту №2.</p><p><a href="http://pixs.ru/showimage/1jpg_3136703_18211020.jpg"><span class="postimg"><img src="http://i10.pixs.ru:/thumbs/0/2/0/1jpg_3136703_18211020.jpg" alt="http://i10.pixs.ru:/thumbs/0/2/0/1jpg_3136703_18211020.jpg" /></span></a>&nbsp; <a href="http://pixs.ru/showimage/2jpg_8021745_18211022.jpg"><span class="postimg"><img src="http://i11.pixs.ru:/thumbs/0/2/2/2jpg_8021745_18211022.jpg" alt="http://i11.pixs.ru:/thumbs/0/2/2/2jpg_8021745_18211022.jpg" /></span></a><br /></p><div class="codebox"><pre><code>; Фрагмент №1
;-------- Работающий фрагмент-----------
WinWaitActive, Fast Dial - Mozilla Firefox
sleep 50
ControlClick, x206 y33, , , MIDDLE
;--------------------------------------

sleep 500

; Фрагмент №2
;-------- Работающий фрагмент, но только по координатам-----------
WinWaitActive, Fast Dial - Mozilla Firefox
sleep 50
ControlClick, x53 y14 , , , L
;----------------------------------------------------------------

Return</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2015-07-29T17:40:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96116#p96116</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96114#p96114" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>У manualex такое скорее всего никогда не случится. Просто я считаю, что лучше заранее всё предусмотреть.</p></blockquote></div><p> я постараюсь всё учесть, т.к. этот скрипт будет фрагментом другого скрипта.</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2015-07-29T14:24:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96114#p96114</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96112#p96112" />
			<content type="html"><![CDATA[<p>Я к тому, что <em>Loop</em> - коварная команда. Если внутри цикла нет команд, требующих существенного времени на выполнение, то период цикла быстро завершается, и цикл повторяется заново (особенно, если уменьшить <em>SetBatchLines</em>). Это загружает процессор.</p><p>Проще говоря, запустите такой скрипт и посмотрите загрузку процессора:</p><div class="codebox"><pre><code>Loop
{
a := a+1
Sleep, 100
}</code></pre></div><p>Затем сравните со вторым скриптом: </p><div class="codebox"><pre><code>Loop
{
a := a+1
}</code></pre></div><p>У <strong>manualex</strong> такое <span style="color: gray"><em>скорее всего</em></span> никогда не случится. Просто я считаю, что лучше заранее всё предусмотреть.</p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2015-07-29T10:12:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96112#p96112</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96106#p96106" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>manualex пишет:</cite><blockquote><p>Работает так</p></blockquote></div><p>Думаю, параметр WinText не помешал бы — мало ли какие ещё предупреждения выдаёт Firefox.<br /></p><div class="quotebox"><cite>ypppu пишет:</cite><blockquote><p>Чтобы не проверять слишком часто условие, можно поставить задержку</p></blockquote></div><p> Не думаю, что такое окно должно выскакивать меньше чем через четверть секунды после закрытия. Если да, то от такого совета просто увеличится время его лицезрения до очередного закрытия.</p>]]></content>
			<author>
				<name><![CDATA[shiz]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26249</uri>
			</author>
			<updated>2015-07-29T09:10:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96106#p96106</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96104#p96104" />
			<content type="html"><![CDATA[<p>Чтобы не проверять слишком часто условие, можно поставить задержку:<br /></p><div class="codebox"><pre><code>Loop
{
    WinWait,  Предупреждение ahk_class MozillaDialogClass ahk_exe firefox.exe
    WinClose, Предупреждение ahk_class MozillaDialogClass ahk_exe firefox.exe
    Sleep, 250
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2015-07-29T08:13:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96104#p96104</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96103#p96103" />
			<content type="html"><![CDATA[<p>Всем спасибо.<br />Работает так:<br /></p><div class="codebox"><pre><code>Loop {
    WinWait Предупреждение ahk_class MozillaDialogClass ahk_exe firefox.exe
       
    WinClose
}</code></pre></div><p><span style="color: green">Код оформляется тегом <strong>code</strong>!</span></p>]]></content>
			<author>
				<name><![CDATA[manualex]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33236</uri>
			</author>
			<updated>2015-07-29T04:26:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96103#p96103</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96096#p96096" />
			<content type="html"><![CDATA[<p>Спасибо, я так ещё не успел сделать, правда это не от меня зависит.</p><p>Докатился:<br /> - ТС - не я;<br /> - посты пишу я.</p><p>Но, радует, хоть понятно, что есть, и&nbsp; что я упустил - блин, хотел проще, а получается как всегда.</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2015-07-28T21:52:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96096#p96096</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96095#p96095" />
			<content type="html"><![CDATA[<p>Исправил #5 с учётом скриншота из #6.</p>]]></content>
			<author>
				<name><![CDATA[shiz]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26249</uri>
			</author>
			<updated>2015-07-28T21:41:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96095#p96095</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96094#p96094" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong> Спасибо, но тут закрытие эквивалент нажатия.</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2015-07-28T21:25:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96094#p96094</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96093#p96093" />
			<content type="html"><![CDATA[<p>Если необходимо именно нажать на кнопку, а не просто закрыть окно, то тут обсуждали:<br /><a href="http://forum.script-coding.com/viewtopic.php?id=10570">http://forum.script-coding.com/viewtopic.php?id=10570</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-07-28T21:21:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96093#p96093</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Закрыть alertBox в Firefox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96092#p96092" />
			<content type="html"><![CDATA[<p>Завтра, если он будет активен, я в скайпе переберу все возможные варианты + я забыл скрытые окна, может поможет.</p><p>Два скришота прислали почтой, что то новенькое. </p><div class="quotebox"><blockquote><p>Запустил AhkSpy. Он нашел коды кнопок:<br />1. OK (рис.1)<br />2. Закрыть (рис.2)<br />Может чем поможет?<br />Читал твой пост на форуме.</p></blockquote></div><p><a href="http://pixs.ru/showimage/1JPG_5390116_18201749.jpg"><span class="postimg"><img src="http://i11.pixs.ru:/thumbs/7/4/9/1JPG_5390116_18201749.jpg" alt="http://i11.pixs.ru:/thumbs/7/4/9/1JPG_5390116_18201749.jpg" /></span></a><a href="http://pixs.ru/showimage/2JPG_7441085_18201753.jpg"><span class="postimg"><img src="http://i11.pixs.ru:/thumbs/7/5/3/2JPG_7441085_18201753.jpg" alt="http://i11.pixs.ru:/thumbs/7/5/3/2JPG_7441085_18201753.jpg" /></span></a></p><p>&quot;Почтальон Печкин&quot;© - это я про себя.</p>]]></content>
			<author>
				<name><![CDATA[Indomito]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27285</uri>
			</author>
			<updated>2015-07-28T21:15:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96092#p96092</id>
		</entry>
</feed>
