<?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=5408&amp;type=atom" />
	<updated>2011-09-10T08:25:12Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=5408</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51368#p51368" />
			<content type="html"><![CDATA[<p>Ладно, спасибо.<br />Тяжёлый для меня код.<br />Надо разбираться.<br />Может позже, через месяц ещё что нибудь спрошу, а пока мне надо это переворить.</p>]]></content>
			<author>
				<name><![CDATA[Вася Пупкин]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24229</uri>
			</author>
			<updated>2011-09-10T08:25:12Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51368#p51368</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51334#p51334" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Вася Пупкин пишет:</cite><blockquote><p>Щас я голову ломаю над следующей задачей...</p></blockquote></div><p>Не стоит заниматься членовредительством. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><div class="codebox"><pre><code>SetBatchLines, -1
CoordMode, Mouse
WinGet, WinID, ID, ahk_class Shell_TrayWnd
WinGetPos,,, Width, Height, % &quot;ahk_id&quot; WinID
Width:=12
GUIXPos:=A_ScreenWidth-Width
GUIYPos:=(A_ScreenHeight-Height)-(Height+1)
GUIYPos2:=GUIYPos-(Height+1)
GUIYPos3:=GUIYPos2-(Height+1)
Hotkey, Ctrl &amp; Esc, ExitScript
SetTimer, ChaseCoordinates, 250
SetTimer, ChaseCoordinates2, 250
SetTimer, ChaseCoordinates3, 250
Gosub, TrayMenu
Return

ChaseCoordinates:
   MouseGetPos, XPos, YPos, WinID
   WinGetClass, WinClass, % &quot;ahk_id&quot; WinID
   If (WinID=GUIID)
   {
      Gui, Color, Red
      RevealGUI()
      If ((GetKeyState(&quot;vk01&quot; &quot;P&quot;)
        Or GetKeyState(&quot;vk02&quot; &quot;P&quot;))
        And XPos&gt;=GUIXPos
        And YPos&gt;=GUIYPos And !Iterate)
      {
         TrayTip, Действие первое, при перетаскивании,, 2
         Iterate:=1
      }
   }
   Else
   {
      Gui, Color, Green
      RevealGUI()
      Iterate:=0
   }
   Return

ChaseCoordinates2:
   MouseGetPos, XPos2, YPos2, WinID2
   WinGetClass, WinClass, % &quot;ahk_id&quot; WinID2
   If (WinID2=GUIID2)
   {
      Gui, 2:Color, Blue
      RevealGUI2()
      If ((GetKeyState(&quot;vk01&quot; &quot;P&quot;)
        Or GetKeyState(&quot;vk02&quot; &quot;P&quot;))
        And XPos2&gt;=GUIXPos
        And YPos2&gt;=GUIYPos2 And !Iterate2)
      {
         TrayTip, Действие второе, при перетаскивании,, 2
         Iterate2:=1
      }
   }
   Else
   {
      Gui, 2:Color, Yellow
      RevealGUI2()
      Iterate2:=0
   }
   Return

ChaseCoordinates3:
   MouseGetPos, XPos3, YPos3, WinID3
   WinGetClass, WinClass, % &quot;ahk_id&quot; WinID3
   If (WinID3=GUIID3)
   {
      Gui, 3:Color, Fuchsia
      RevealGUI3()
      If ((GetKeyState(&quot;vk01&quot; &quot;P&quot;)
        Or GetKeyState(&quot;vk02&quot; &quot;P&quot;))
        And XPos3&gt;=GUIXPos
        And YPos3&gt;=GUIYPos3 And !Iterate3)
      {
         TrayTip, Действие третье, при перетаскивании,, 2
         Iterate3:=1
      }
   }
   Else
   {
      Gui, 3:Color, Aqua
      RevealGUI3()
      Iterate3:=0
   }
   Return

~LButton::
~RButton::
   If (XPos&gt;=GUIXPos And YPos&gt;=GUIYPos)
   {
      SetTimer, ChaseCoordinates, Off
      TrayTip, Действие первое, по клику,, 1
      Iterate:=1
      SetTimer, ChaseCoordinates, 250
   }
   Else If (XPos2&gt;=GUIXPos And YPos2&gt;=GUIYPos2)
   {
      SetTimer, ChaseCoordinates2, Off
      TrayTip, Действие второе, по клику,, 1
      Iterate2:=1
      SetTimer, ChaseCoordinates2, 250
   }
   Else If (XPos3&gt;=GUIXPos And YPos3&gt;=GUIYPos3)
   {
      SetTimer, ChaseCoordinates3, Off
      TrayTip, Действие третье, по клику,, 1
      Iterate3:=1
      SetTimer, ChaseCoordinates3, 250
   }
   Return

TrayMenu:
   Menu, Tray, NoStandard
   Menu, Tray, Icon, shell32.dll, 35
   Menu, Tray, Tip, Hide/Show Desktop
   Menu, Tray, Add, &amp;About, About
   Menu, Tray, Add, &amp;Exit (Ctrl+Esc), ExitScript
   OnMessage(0x404, &quot;WM_LBUTTONDOWN&quot;)
   Return

About:
   OpenAbout:=1
   Hotkey, Ctrl &amp; Esc, Off
   SetTimer, ChaseCoordinates, Off
   SetTimer, ChaseCoordinates2, Off
   SetTimer, ChaseCoordinates3, Off
   Gui, Destroy
   Gui, 2:Destroy
   Gui, 3:Destroy
   Gui, Add
      , Text
      , x32 y30 w140 h20 +Center
      , Made using AutoHotkey for
   Gui, Font, Bold
   Gui, Add
      , Text
      , x32 y50 w140 h20 +Center
      , Vasya Pupkin
   Gui, Font
   Gui, Font, CBlue Underline
   Gui, Add
      , Text
      , x22 y90 w160 h20 gAHKHome +Center
      , www.autohotkey.com
   Gui, Font
   Gui, Add, GroupBox, x22 y10 w160 h110
   Gui, -MinimizeBox -Resize
   Gui, Show, Center h135 w205, About
   hHandCursor:=DllCall(&quot;LoadCursor&quot;, UInt, 0
                                    , Int, 32649)
   OnMessage(0x200, &quot;WM_MOUSEMOVE&quot;)
   Return

AHKHome:
   Run, http://www.autohotkey.com,, UseErrorLevel
   Return

GuiClose:
   OpenAbout:=0
   Gui, Destroy
   SetTimer, ChaseCoordinates, 250
   SetTimer, ChaseCoordinates2, 250
   SetTimer, ChaseCoordinates3, 250
   Hotkey, Ctrl &amp; Esc, On
   Return

ExitScript:
   ExitApp

RevealGUI()
{
   Global
   Gui, +AlwaysOnTop
      . -Caption
      . +ToolWindow
      . +ToolWindow
      . +Border
      . +LastFound
;   WinSet, Trans, 125, ahk_class AutoHotkeyGUI
   Gui, Show, NoActivate x%GUIXPos%
                       . y%GUIYPos%
                       . w%Width%
                       . h%Height%
   GUIID:=WinExist()
}

RevealGUI2()
{
   Global
   Gui, 2:+AlwaysOnTop
      . -Caption
      . +ToolWindow
      . +ToolWindow
      . +Border
      . +LastFound
;   WinSet, Trans, 125, ahk_class AutoHotkeyGUI
   Gui, 2:Show, NoActivate x%GUIXPos%
                         . y%GUIYPos2%
                         . w%Width%
                         . h%Height%
   GUIID2:=WinExist()
}

RevealGUI3()
{
   Global
   Gui, 3:+AlwaysOnTop
      . -Caption
      . +ToolWindow
      . +ToolWindow
      . +Border
      . +LastFound
;   WinSet, Trans, 125, ahk_class AutoHotkeyGUI
   Gui, 3:Show, NoActivate x%GUIXPos%
                         . y%GUIYPos3%
                         . w%Width%
                         . h%Height%
   GUIID3:=WinExist()
}

WM_MOUSEMOVE(wParam, lParam)
{
   Global hHandCursor, Hover
   MouseGetPos,,,, WinControl
   If WinControl=Static3
      DllCall(&quot;SetCursor&quot;, UInt, hHandCursor)
}

WM_LBUTTONDOWN(uMsg, lParam)
{
   Global
   If (uMsg=0x404 And lParam=0x201)
   {
      If OpenAbout
         SetTimer, GuiClose, -0
      Else
         SetTimer, About, -0
   }
}</code></pre></div><p><em>Гъюишек</em> тут три, нужно больше?, добавь по аналогии.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-08T22:46:15Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51334#p51334</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51298#p51298" />
			<content type="html"><![CDATA[<p>Скрипт1:<br /></p><div class="codebox"><pre><code>SetBatchLines, -1
CoordMode, Mouse
WinGet, WinID, ID, ahk_class Shell_TrayWnd
WinGetPos,,,, Height, % &quot;ahk_id&quot; WinID
Width:=12
GUIXPos:=A_ScreenWidth-Width
GUIYPos:=A_ScreenHeight-Height
Hotkey, Esc, ExitScript
SetTimer, ChaseCoordinates, 250
Gosub, TrayMenu
Return
 
ChaseCoordinates:
   MouseGetPos, XPos, YPos, WinID
   WinGetClass, WinClass, % &quot;ahk_id&quot; WinID
   If WinClass=AutoHotkeyGUI
   {
      Gui, Color, Red
      RevealGUI()
      If ((GetKeyState(&quot;vk01&quot; &quot;P&quot;)
        || GetKeyState(&quot;vk02&quot; &quot;P&quot;))
        &amp;&amp; XPos&gt;=GUIXPos
        &amp;&amp; YPos&gt;=GUIYPos &amp;&amp; !Iterate)
      {
         Send, #{vk44}
         Iterate:=1
      }
   }
   Else
   {
      Gui, Color, Green
      RevealGUI()
      Iterate:=0
   }
   Return
 
~LButton::
~RButton::
   If (XPos&gt;=GUIXPos &amp;&amp; YPos&gt;=GUIYPos)
   {
      SetTimer, ChaseCoordinates, Off
      Send, #{vk44}
      Iterate:=1
      SetTimer, ChaseCoordinates, 250
   }
   Return
 
TrayMenu:
   Menu, Tray, NoStandard
   Menu, Tray, Icon, shell32.dll, 35
   Menu, Tray, Tip, Hide/Show Desktop
   Menu, Tray, Add, &amp;About, About
   Menu, Tray, Add, &amp;Exit (Esc), ExitScript
   OnMessage(0x404, &quot;WM_LBUTTONDOWN&quot;)
   Return
 
About:
   Hotkey, Esc, Off
   SetTimer, ChaseCoordinates, Off
   Gui, Destroy
   Gui, Add, Text, x32 y30 w140 h20 +Center, Made using AutoHotkey for
   Gui, Font, Bold
   Gui, Add, Text, x32 y50 w140 h20 +Center, Vasya Pupkin
   Gui, Font
   Gui, Font, CBlue Underline
   Gui, Add, Text, x22 y90 w160 h20 gAHKHome +Center, www.autohotkey.com
   Gui, Font
   Gui, Add, GroupBox, x22 y10 w160 h110
   Gui, -MinimizeBox -Resize
   Gui, Show, Center h143 w207, About
   hHandCursor:=DllCall(&quot;LoadCursor&quot;, UInt, 0, Int, 32649) ; IDC_HAND
   OnMessage(0x200, &quot;WM_MOUSEMOVE&quot;)
   Return
 
AHKHome:
   Run, http://www.autohotkey.com,, UseErrorLevel
   Return
 
GuiClose:
   Gui, Destroy
   SetTimer, ChaseCoordinates, 250
   Hotkey, Esc, On
   Return
 
ExitScript:
   ExitApp
 
RevealGUI()
{
Global
Gui, +AlwaysOnTop
   . -Caption
   . +ToolWindow
   . +ToolWindow
   . +Border
   . +LastFound
Gui, Show, NoActivate x%GUIXPos%
                    . y%GUIYPos%
                    . w%Width%
                    . h%Height%
}
 
WM_MOUSEMOVE(wParam, lParam)
{
   Global hHandCursor
   MouseGetPos,,,, WinControl
   If WinControl In Static3
      DllCall(&quot;SetCursor&quot;, UInt, hHandCursor)
}
 
WM_LBUTTONDOWN(uMsg, lParam)
{
   If (uMsg=0x404 &amp;&amp; lParam=0x201)
      SetTimer, About, -0
}</code></pre></div><p>Скрипт2:<br /></p><div class="codebox"><pre><code>SetBatchLines, -1
CoordMode, Mouse
WinGet, WinID, ID, ahk_class Shell_TrayWnd
WinGetPos,,,, Height, % &quot;ahk_id&quot; WinID
Width:=12
GUIXPos:=(A_ScreenWidth/2)-14
GUIYPos:=(A_ScreenHeight/2)-14
Hotkey, Esc, ExitScript
SetTimer, ChaseCoordinates, 250
Gosub, TrayMenu
Return
 
ChaseCoordinates:
   MouseGetPos, XPos, YPos, WinID
   WinGetClass, WinClass, % &quot;ahk_id&quot; WinID
   If WinClass=AutoHotkeyGUI
   {
      Gui, Color, Red
      RevealGUI()
      If ((GetKeyState(&quot;vk01&quot; &quot;P&quot;)
        || GetKeyState(&quot;vk02&quot; &quot;P&quot;))
        &amp;&amp; XPos&gt;=GUIXPos
        &amp;&amp; YPos&gt;=GUIYPos &amp;&amp; !Iterate)
      {
         Send, #{vk44}
         Iterate:=1
      }
   }
   Else
   {
      Gui, Color, Green
      RevealGUI()
      Iterate:=0
   }
   Return
 
~LButton::
~RButton::
   If (XPos&gt;=GUIXPos &amp;&amp; YPos&gt;=GUIYPos)
   {
      SetTimer, ChaseCoordinates, Off
      Send, #{vk44}
      Iterate:=1
      SetTimer, ChaseCoordinates, 250
   }
   Return
 
TrayMenu:
   Menu, Tray, NoStandard
   Menu, Tray, Icon, shell32.dll, 35
   Menu, Tray, Tip, Hide/Show Desktop
   Menu, Tray, Add, &amp;About, About
   Menu, Tray, Add, &amp;Exit (Esc), ExitScript
   OnMessage(0x404, &quot;WM_LBUTTONDOWN&quot;)
   Return
 
About:
   Hotkey, Esc, Off
   SetTimer, ChaseCoordinates, Off
   Gui, Destroy
   Gui, Add, Text, x32 y30 w140 h20 +Center, Made using AutoHotkey for
   Gui, Font, Bold
   Gui, Add, Text, x32 y50 w140 h20 +Center, Vasya Pupkin
   Gui, Font
   Gui, Font, CBlue Underline
   Gui, Add, Text, x22 y90 w160 h20 gAHKHome +Center, www.autohotkey.com
   Gui, Font
   Gui, Add, GroupBox, x22 y10 w160 h110
   Gui, -MinimizeBox -Resize
   Gui, Show, Center h143 w207, About
   hHandCursor:=DllCall(&quot;LoadCursor&quot;, UInt, 0, Int, 32649) ; IDC_HAND
   OnMessage(0x200, &quot;WM_MOUSEMOVE&quot;)
   Return
 
AHKHome:
   Run, http://www.autohotkey.com,, UseErrorLevel
   Return
 
GuiClose:
   Gui, Destroy
   SetTimer, ChaseCoordinates, 250
   Hotkey, Esc, On
   Return
 
ExitScript:
   ExitApp
 
RevealGUI()
{
Global
Gui, +AlwaysOnTop
   . -Caption
   . +ToolWindow
   . +ToolWindow
   . +Border
   . +LastFound
Gui, Show, NoActivate x%GUIXPos%
                    . y%GUIYPos%
                    . w%Width%
                    . h%Height%
}
 
WM_MOUSEMOVE(wParam, lParam)
{
   Global hHandCursor
   MouseGetPos,,,, WinControl
   If WinControl In Static3
      DllCall(&quot;SetCursor&quot;, UInt, hHandCursor)
}
 
WM_LBUTTONDOWN(uMsg, lParam)
{
   If (uMsg=0x404 &amp;&amp; lParam=0x201)
      SetTimer, About, -0
}</code></pre></div><p>Скрипт1. Твой последний скрипт.<br />Скрипт2. Мой скрипт (отредактированный твой последний скрипт).</p><div class="quotebox"><cite>Grey пишет:</cite><blockquote><p>P.S. У меня последний скрипт работает без нареканий, и ни чего не мерцает/мигает.</p></blockquote></div><p>У меня мигал. Но я устранил этот глюк (см. скрипт2). У меня глюк проявлялся когда кнопка(область) находилась на панели задач возле часов (а может под панелью, что возможно и приводило к глюку). Как только я эту область переместил по центру экрана, глюк исчез.</p><p>Я эти две строки:<br /><strong>GUIXPos:=A_ScreenWidth-Width<br />GUIYPos:=A_ScreenHeight-Height</strong></p><p>заменил на:<br /><strong>GUIXPos:=(A_ScreenWidth/2)-14<br />GUIYPos:=(A_ScreenHeight/2)-14</strong></p><p>Щас я голову ломаю над следующей задачей.<br />Дело в том что у меня будет много таких кнопок/областей и выполняющие разные функции.<br />И следовательно в диспечере задач будет висеть много таких процессов со скриптами.<br />Интересно, можно ли соединить их в один скрипт?<br />Например, что бы <strong>Скрипт1</strong> и <strong>Скрипт2</strong> были в одном <strong>*.ahk-файле</strong></p>]]></content>
			<author>
				<name><![CDATA[Вася Пупкин]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24229</uri>
			</author>
			<updated>2011-09-07T17:56:56Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51298#p51298</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51266#p51266" />
			<content type="html"><![CDATA[<p>Добавь строку</p><div class="codebox"><pre><code>WinSet, Trans, 125, ahk_class AutoHotkeyGUI</code></pre></div><p>перед строкой</p><div class="codebox"><pre><code>Gui, Show, NoActivate x%GUIXPos%</code></pre></div><p>где 125 это степень прозрачности в диапазоне от 0 до 255, которую ты можешь выставить по вкусу.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-06T19:09:30Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51266#p51266</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51256#p51256" />
			<content type="html"><![CDATA[<p><strong>Gui, Color, Red<br />Gui, Color, Green</strong><br />В твоём скрипте встречаются красный, зелёный цвета.<br />Что прописать что бы было прозрачный?</p>]]></content>
			<author>
				<name><![CDATA[Вася Пупкин]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24229</uri>
			</author>
			<updated>2011-09-06T17:06:24Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51256#p51256</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51234#p51234" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Вася Пупкин пишет:</cite><blockquote><p>В итоге идеальный скрипт выгледел бы, если можно было объединить:<strong>Пост 28</strong> (пункт 1,2) + <strong>Пост 24</strong> (пункт 3) =&nbsp; <strong>Идеальный скрипт</strong> <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p></blockquote></div><p>Ну так в чём проблема?, <em>мануал</em> под рукой, примеры даны - вперёд!</p><p>P.S. У меня последний скрипт работает без нареканий, и ни чего не мерцает/мигает.</p>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-06T07:46:53Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51234#p51234</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51230#p51230" />
			<content type="html"><![CDATA[<p>Ну ладно спасибо и на этом.<br />И так много для меня сделал <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Всё таки скажу, что в итоге получилось.</p><p><strong>Пост 28</strong> (последний твой пост). Скрипт демонстрирует следующее:<br />(+) 1. Без перетаскивания работает Супер. При клике выполняется функция (это правильно).<br />(+) 2. При подводе курсора к областе без кликов, нечего не происходит (это правильно).<br />(-) 3. Перетаскивание глючит. Окна просто мигают. Зачем то (незнаю зачем) при перетаскивании файла/папки на область функция выполняется 2 раза (надо 1 раз), что приводит к миганию, т.е. свёртывание всех окон и тут же развёртывание через 250 милесекунд.</p><p><strong>Пост 24</strong><br />(-) 1. Без перетаскивания работает не правильно. При клике по областе нечего не происходит (это не правильно).<br />(-) 2. При подводе курсора к областе без кликов, выполняется функция (это не правильно).<br />(+) 3. Перетаскивание работает зашибись.</p><p>В итоге идеальный скрипт выгледел бы, если можно было объединить:<br /><strong>Пост 28</strong> (пункт 1,2) + <strong>Пост 24</strong> (пункт 3) =&nbsp; <strong>Идеальный скрипт</strong> <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Вася Пупкин]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24229</uri>
			</author>
			<updated>2011-09-06T01:53:28Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51230#p51230</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51219#p51219" />
			<content type="html"><![CDATA[<p>Думаю, что более пробовать уже не будем. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p><div class="codebox"><pre><code>SetBatchLines, -1
CoordMode, Mouse
WinGet, WinID, ID, ahk_class Shell_TrayWnd
WinGetPos,,,, Height, % &quot;ahk_id&quot; WinID
Width:=12
GUIXPos:=A_ScreenWidth-Width
GUIYPos:=A_ScreenHeight-Height
Hotkey, Esc, ExitScript
SetTimer, ChaseCoordinates, 250
Gosub, TrayMenu
Return

ChaseCoordinates:
   MouseGetPos, XPos, YPos, WinID
   WinGetClass, WinClass, % &quot;ahk_id&quot; WinID
   If WinClass=AutoHotkeyGUI
   {
      Gui, Color, Red
      RevealGUI()
      If ((GetKeyState(&quot;vk01&quot; &quot;P&quot;)
        || GetKeyState(&quot;vk02&quot; &quot;P&quot;))
        &amp;&amp; XPos&gt;=GUIXPos
        &amp;&amp; YPos&gt;=GUIYPos &amp;&amp; !Iterate)
      {
         Send, #{vk44}
         Iterate:=1
      }
   }
   Else
   {
      Gui, Color, Green
      RevealGUI()
      Iterate:=0
   }
   Return

~LButton::
~RButton::
   If (XPos&gt;=GUIXPos &amp;&amp; YPos&gt;=GUIYPos)
   {
      SetTimer, ChaseCoordinates, Off
      Send, #{vk44}
      Iterate:=1
      SetTimer, ChaseCoordinates, 250
   }
   Return

TrayMenu:
   Menu, Tray, NoStandard
   Menu, Tray, Icon, shell32.dll, 35
   Menu, Tray, Tip, Hide/Show Desktop
   Menu, Tray, Add, &amp;About, About
   Menu, Tray, Add, &amp;Exit (Esc), ExitScript
   OnMessage(0x404, &quot;WM_LBUTTONDOWN&quot;)
   Return

About:
   Hotkey, Esc, Off
   SetTimer, ChaseCoordinates, Off
   Gui, Destroy
   Gui, Add, Text, x32 y30 w140 h20 +Center, Made using AutoHotkey for
   Gui, Font, Bold
   Gui, Add, Text, x32 y50 w140 h20 +Center, Vasya Pupkin
   Gui, Font
   Gui, Font, CBlue Underline
   Gui, Add, Text, x22 y90 w160 h20 gAHKHome +Center, www.autohotkey.com
   Gui, Font
   Gui, Add, GroupBox, x22 y10 w160 h110
   Gui, -MinimizeBox -Resize
   Gui, Show, Center h143 w207, About
   hHandCursor:=DllCall(&quot;LoadCursor&quot;, UInt, 0, Int, 32649) ; IDC_HAND
   OnMessage(0x200, &quot;WM_MOUSEMOVE&quot;)
   Return

AHKHome:
   Run, http://www.autohotkey.com,, UseErrorLevel
   Return

GuiClose:
   Gui, Destroy
   SetTimer, ChaseCoordinates, 250
   Hotkey, Esc, On
   Return

ExitScript:
   ExitApp

RevealGUI()
{
Global
Gui, +AlwaysOnTop
   . -Caption
   . +ToolWindow
   . +ToolWindow
   . +Border
   . +LastFound
Gui, Show, NoActivate x%GUIXPos%
                    . y%GUIYPos%
                    . w%Width%
                    . h%Height%
}

WM_MOUSEMOVE(wParam, lParam)
{
   Global hHandCursor
   MouseGetPos,,,, WinControl
   If WinControl In Static3
      DllCall(&quot;SetCursor&quot;, UInt, hHandCursor)
}

WM_LBUTTONDOWN(uMsg, lParam)
{
   If (uMsg=0x404 &amp;&amp; lParam=0x201)
      SetTimer, About, -0
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-05T13:25:54Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51219#p51219</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51203#p51203" />
			<content type="html"><![CDATA[<p>Да, вот такой мне скрипт надо, тока он работает, как то через раз.</p><p>Запускаю скрипт<br />1й клик по областе - выполняется функция<br />2й клик по областе - выполняется функция<br />3й клик по областе - не чего не происходит<br />4й клик по областе - не чего не происходит<br />5й клик по областе - не чего не происходит<br />..........<br />отвожу курсор в сторону<br />опять подвожу к областе<br />1й клик по областе - выполняется функция<br />2й клик по областе - выполняется функция<br />3й клик по областе - не чего не происходит<br />4й клик по областе - не чего не происходит<br />5й клик по областе - не чего не происходит<br />.................<br />и так по кругу.<br />С перетаскиванием таже фигня.</p><p><strong>Перетаскивание</strong> файла/папки в предыдущем скрипте (там где я говорил &quot;Скрипт Супер&quot;, было реализовано идеально, без сбоев, зря ты его трогал.<br />Давай попробуем ещё раз <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Вася Пупкин]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24229</uri>
			</author>
			<updated>2011-09-05T03:13:53Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51203#p51203</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51193#p51193" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>SetBatchLines, -1
CoordMode, Mouse
WinGet, WinID, ID, ahk_class Shell_TrayWnd
WinGetPos,,,, Height, % &quot;ahk_id&quot; WinID
Width:=12
GUIXPos:=A_ScreenWidth-Width
GUIYPos:=A_ScreenHeight-Height
SetTimer, ChaseCoordinates, 250
RedrawLostedGUI:
Gui, Color, Blue
RevealGUI()
OnMessage(0x201, &quot;WM_LBUTTONDOWN&quot;)
Return

ChaseCoordinates:
   MouseGetPos, XPos, YPos, WinID
   If ((GetKeyState(&quot;vk01&quot; &quot;P&quot;)
     || GetKeyState(&quot;vk02&quot; &quot;P&quot;))
     &amp;&amp; XPos&gt;=GUIXPos
     &amp;&amp; YPos&gt;=GUIYPos)
   {
      Gui, Color, Red
      RevealGUI()
      If !Iterate
      {
         Send, #{vk44}
         Iterate:=1
      }
      SetTimer, CheckColor, -250
   }
   Return

CheckColor:
   WinGetClass, WinClass, % &quot;ahk_id&quot; WinID
   If WinClass=AutoHotkeyGUI
   {
      Gui, Color, Red
      RevealGUI()
   }
   Else
   {
      Gui, Color, Green
      RevealGUI()
      Iterate:=0
   }
   Return

#If MouseIsOver(&quot;ahk_class Shell_TrayWnd&quot;)
~LButton::
~RButton::
   SetTimer, RedrawLostedGUI, -250
   Return

RevealGUI()
{
Global
Gui, +AlwaysOnTop
   . -Caption
   . +ToolWindow
   . +ToolWindow
   . +Border
   . +LastFound
Gui, Show, NoActivate x%GUIXPos%
                    . y%GUIYPos%
                    . w%Width%
                    . h%Height%
}

WM_LBUTTONDOWN()
{
   Gui, Color, Red
   RevealGUI()
   Send #{vk44}
   SetTimer, CheckColor, -1000
}

MouseIsOver(WinTitle)
{
   Global
   Return, WinExist(WinTitle . &quot; ahk_id &quot;
                             . WinID)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-04T19:54:58Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51193#p51193</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51173#p51173" />
			<content type="html"><![CDATA[<p>Не плохо получилось, совсем почти здорово получилось.<br />Спасибо!<br />Но всё же немного хотелось бы доработать:<br />1. Перетаскивание работает зашибись, его трогать не надо. Работает супер.<br />2. А просто при подводе курсора к областе (без зажатой ЛКМ) вообще нечего делать не надо. А у тебя выполняется функция эта (горячая клавиша). Лучше сделать что бы она выполнялась, не при подводе к областе, а при щелчке по нему, как в этом оригинальном скрипте:<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=44397#p44397">http://forum.script-coding.com/viewtopi … 397#p44397</a></p><p>Р.s. Ещё раз повторяю. Алгоритм <strong>по перетаскиванию</strong> папки/файла работает просто Супер, его трогать не надо, надо просто дописать скрипт. <br />Как говорят програмисты: <br />&quot;Если работает, не трогай!&quot; <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Вася Пупкин]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24229</uri>
			</author>
			<updated>2011-09-04T15:44:38Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51173#p51173</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51168#p51168" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>SetBatchLines, -1
CoordMode, Mouse
WinGet, WinID, ID, ahk_class Shell_TrayWnd
WinGetPos,,,, Height, % &quot;ahk_id&quot; WinID
Width:=12
GUIXPos:=A_ScreenWidth-Width
GUIYPos:=A_ScreenHeight-Height
SetTimer, ChaseCoordinates, 250
RedrawLostedGUI:
Gui, Color, Blue
Gui, +AlwaysOnTop
   . -Caption
   . +ToolWindow
   . +ToolWindow
   . +Border
   . +LastFound
Gui, Show, NoActivate x%GUIXPos%
                    . y%GUIYPos%
                    . w%Width%
                    . h%Height%
Return

ChaseCoordinates:
   MouseGetPos, XPos, YPos, WinID
   If (XPos &gt;= GUIXPos &amp;&amp; YPos &gt;= GUIYPos)
   {
      Gui, Color, Red
      If !Iterate
      {
         Send, #{vk44} ; win+d
         Iterate:=1
         SetTimer, CheckColor, -250
      }
      Else
         SetTimer, CheckColor, -250
   }
   Return

CheckColor:
   WinGetClass, WinClass, % &quot;ahk_id&quot; WinID
   If WinClass=AutoHotkeyGUI
      Gui, Color, Red
   Else
   {
      Gui, Color, Green
      Iterate:=0
   }
   Return

#If MouseIsOver(&quot;ahk_class Shell_TrayWnd&quot;)
~LButton::
~RButton::
   SetTimer, RedrawLostedGUI, -350
   Return

MouseIsOver(WinTitle)
{
   Global
   Return, WinExist(WinTitle . &quot; ahk_id &quot; . WinID)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-09-04T15:03:20Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51168#p51168</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51158#p51158" />
			<content type="html"><![CDATA[<p><span style="color: Green"><strong>Вася Пупкин</strong>, картинки лучше помещать на профильные ресурсы, как-то: <a href="http://imagevenue.com/">http://imagevenue.com/</a>, в виде миниатюры со ссылкой:<br /><a href="http://img262.imagevenue.com/img.php?image=91076_CancelInstall_122_185lo.JPG"><span class="postimg"><img src="http://img262.imagevenue.com/loc185/th_91076_CancelInstall_122_185lo.JPG" alt="http://img262.imagevenue.com/loc185/th_91076_CancelInstall_122_185lo.JPG" /></span></a><br />или полноразмерное изображение:<br /><span class="postimg"><img src="http://img262.imagevenue.com/aAfkjfp01fo1i-6413/loc185/91076_CancelInstall_122_185lo.JPG" alt="http://img262.imagevenue.com/aAfkjfp01fo1i-6413/loc185/91076_CancelInstall_122_185lo.JPG" /></span></span><br /><span style="color: Green"><a href="http://imageshack.us/">http://imageshack.us/</a>, <a href="http://radikal.ru/">http://radikal.ru/</a>, <a href="http://savepic.ru/">http://savepic.ru/</a> и <a href="http://www.google.ru/search?hl=ru&amp;q=%D0%B1%D0%B5%D1%81%D0%BF%D0%BB%D0%B0%D1%82%D0%BD%D1%8B%D0%B9+%D1%85%D0%BE%D1%81%D1%82%D0%B8%D0%BD%D0%B3+%D1%85%D1%80%D0%B0%D0%BD%D0%B5%D0%BD%D0%B8%D1%8F+%D0%B8%D0%B7%D0%BE%D0%B1%D1%80%D0%B0%D0%B6%D0%B5%D0%BD%D0%B8%D0%B9">тому подобные</a>. В крайнем случае на <a href="http://fotki.yandex.ru/">Яндекс.Фотки</a> же, например:<br /><span class="postimg"><img src="http://img-fotki.yandex.ru/get/4813/6476532.0/0_5dd91_83fa32ea_L.jpg" alt="http://img-fotki.yandex.ru/get/4813/6476532.0/0_5dd91_83fa32ea_L.jpg" /></span><br />в конце концов, обычную ссылку на страницу хостинге изображений, но никак не на <a href="http://narod.yandex.ru/">Яндекс.Народ</a>, который для этого совершенно не предназначен.</span></p><p><span style="color: Green">Для оформления картинок требуется <a href="http://forum.script-coding.com/help.php#bbcode">тэг «img»</a>. Как правило, порядочные хостинги для каждой Вашей загруженной картинки дают готовый BBCode.</span></p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-09-04T10:39:43Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51158#p51158</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51154#p51154" />
			<content type="html"><![CDATA[<p>Спасибо. Обновил программу. Скрипт заработал.<br />Но опять не так как надо.<br />Незнай, может ты меня не слышиш или просто у меня система другая.<br />Моя система: win XP SP3.<br />Или прочитай мой пост ещё раз:<br /><a href="http://forum.script-coding.com/viewtopic.php?pid=44397#p51133">http://forum.script-coding.com/viewtopi … 397#p51133</a></p><p>Объясняю ещё раз:<br />См. картинку (это твой скрипт):<br /><a href="http://narod.ru/disk/23950473001/%D0%91%D0%B5%D0%B7%D1%8B%D0%BC%D1%8F%D0%BD%D0%BD%D1%8B%D0%B9.JPG.html">http://narod.ru/disk/23950473001/%D0%91 … 9.JPG.html</a></p><p>Кароче, зацепаю папку (1 на рисунке), тащу к областе (2 на рисунке).<br />После того как курсор подходит к области (2 на рисунке) <br />курсор сразу меняется на чёрный зачёркнутый кружок (2 на рисунке).</p><p>Твой скрипт выполняет то что мне не надо, а именно:<br />1. Выполняет функцию (горячую клавишу) при подводе к областе с зажатой ЛКМ, но предварительно <strong>НЕ</strong> была зацеплена папка/файл ЛКМ.<br />2. Просто при подводе, без зажатой ЛКМ скрипт просто мигает, т.е. через 300 милисекунд сворачивает все окна, и через 300 милисекунд разворачивает.</p><p>Спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Вася Пупкин]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=24229</uri>
			</author>
			<updated>2011-09-04T07:40:37Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51154#p51154</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Клик мышью по области]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=51147#p51147" />
			<content type="html"><![CDATA[<p><span style="color: Green"><strong>Вася Пупкин</strong>, ссылки оформляем <a href="http://forum.script-coding.com/help.php#bbcode">тэгом «url»</a>. Я поправил <a href="http://forum.script-coding.com/viewtopic.php?pid=51133#p51133">Ваш пост</a>.</span></p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-09-04T01:36:07Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=51147#p51147</id>
		</entry>
</feed>
