<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Переход на уровень вверх по double click]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=17131</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17131&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Переход на уровень вверх по double click».]]></description>
		<lastBuildDate>Fri, 20 May 2022 02:45:00 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153288#p153288</link>
			<description><![CDATA[<p>Сейчас только проверил, по мне этот вариант идеальный! Ни одного ложного срабатывания. 100% отработал как надо. Большое вам спасибо уважаемый <strong>teadrinker</strong> за такой замечательный скрипт. Скрипту точно место в коллекции.</p>]]></description>
			<author><![CDATA[null@example.com (ppss42)]]></author>
			<pubDate>Fri, 20 May 2022 02:45:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153288#p153288</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153286#p153286</link>
			<description><![CDATA[<p>Вот так должно быть надёжнее:<br /></p><div class="codebox"><pre><code>#If !res &amp;&amp; hWnd := WinActive(&quot;ahk_class CabinetWClass&quot;)
~LButton::
   if !res := IsEmptySpaceUnderCusor()
      Return
   KeyWait, LButton
   KeyWait, LButton, D T.4
   (!ErrorLevel &amp;&amp; NavigateToParentDir(hWnd))
   res := &quot;&quot;
   Return
#If

IsEmptySpaceUnderCusor() {
   Return AccObjectFromPoint().accRole(0) = (ROLE_SYSTEM_LIST := 0x21)
}

AccObjectFromPoint(ByRef childId = &quot;&quot;, x = &quot;&quot;, y = &quot;&quot;) {
   static VT_DISPATCH := 9, F_OWNVALUE := 1, h := DllCall(&quot;LoadLibrary&quot;, &quot;Str&quot;, &quot;oleacc&quot;, &quot;Ptr&quot;)
   AccObject := 0
   (x = &quot;&quot; || y = &quot;&quot;) ? DllCall(&quot;GetCursorPos&quot;, &quot;Int64P&quot;, pt) : pt := x &amp; 0xFFFFFFFF | y &lt;&lt; 32
   VarSetCapacity(varChild, 8 + A_PtrSize*2, 0)
   if DllCall(&quot;oleacc\AccessibleObjectFromPoint&quot;, &quot;Int64&quot;, pt, &quot;PtrP&quot;, pAcc, &quot;Ptr&quot;, &amp;varChild) = 0
      childId := NumGet(varChild, 8, &quot;UInt&quot;), AccObject := ComObject(VT_DISPATCH, pAcc, F_OWNVALUE)
   Return AccObject
}

NavigateToParentDir(hWnd) {
   static comType := (VT_ARRAY := 0x2000) | (VT_UI1 := 0x11)
   Shell := ComObjCreate(&quot;Shell.Application&quot;)
   for Window in Shell.Windows {
      if (hWnd = Window.hwnd) {
         Folder := Window.Document.Folder
         parentDirPath := Folder.ParentFolder.Self.Path
         break
      }
   }
   if parentDirPath {
      DllCall(&quot;shell32\SHParseDisplayName&quot;, &quot;WStr&quot;, parentDirPath, &quot;Ptr&quot;, 0, &quot;PtrP&quot;, PIDL, &quot;UInt&quot;, 0, &quot;Ptr&quot;, 0)
      ilSize := DllCall(&quot;shell32\ILGetSize&quot;, &quot;Ptr&quot;, PIDL, &quot;UInt&quot;)
      VarSetCapacity(SAFEARRAY, 16 + A_PtrSize*2, 0)
      NumPut(1     , SAFEARRAY)
      NumPut(1     , SAFEARRAY, 4)
      NumPut(PIDL  , SAFEARRAY, 8 + A_PtrSize)
      NumPut(ilSize, SAFEARRAY, 8 + A_PtrSize*2)
      try Window.Navigate2( ComObject(comType, &amp;SAFEARRAY), 0 )
      DllCall(&quot;shell32\ILFree&quot;, &quot;Ptr&quot;, PIDL)
   }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 19 May 2022 11:56:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153286#p153286</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153284#p153284</link>
			<description><![CDATA[<p><strong>teadrinker</strong> Понимаю, изначально считал что невозможно это сделать средствами ahk. Спасибо вам большое за реализацию скрипта.</p>]]></description>
			<author><![CDATA[null@example.com (ppss42)]]></author>
			<pubDate>Thu, 19 May 2022 11:24:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153284#p153284</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153282#p153282</link>
			<description><![CDATA[<div class="quotebox"><cite>ppss42 пишет:</cite><blockquote><p>теперь понял как выкладывать на i.imgur.</p></blockquote></div><p>Ваш сервис тоже даёт прямую ссылку, вот она:<br /></p><div class="fancy_spoiler_switcher"><div class="fancy_spoiler_switcher_header" data-lang-open="открыть спойлер" data-lang-close="скрыть спойлер"><strong>+</strong>&nbsp;открыть спойлер</div><div class="fancy_spoiler"><p><span class="postimg"><img src="https://i.imgur.com/UyEQLHg.png" alt="https://i.imgur.com/UyEQLHg.png" /></span></p></div></div><div class="quotebox"><cite>ppss42 пишет:</cite><blockquote><p>изредка имеют место ложные срабатывания</p></blockquote></div><p>Скорее всего, с этим ничего не сделаешь, просто основная функция двойного клика успевает сработать раньше, чем код скрипта. Потестировал, у меня такое происходит очень редко, но случалось.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 19 May 2022 10:50:30 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153282#p153282</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153279#p153279</link>
			<description><![CDATA[<p><strong>teadrinker</strong> теперь понял как выкладывать на i.imgur. По скрипту: ошибки не выдает, но изредка имеют место ложные срабатывания. При открытие папки, она открывается на сотые доли секунды, и тут же возвращается на уровень вверх (то есть на исходную директорию где был сделан клик)<br />P.s. Если бы не этот небольшой недочет, то наверное ему место в коллекции. Уж очень удобный в повседневном использовании.</p>]]></description>
			<author><![CDATA[null@example.com (ppss42)]]></author>
			<pubDate>Thu, 19 May 2022 10:40:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153279#p153279</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153273#p153273</link>
			<description><![CDATA[<p>Чтобы отобразить картинку, пользуйтесь сервисами, где можно получить прямую ссылку на изображение, эту ссылку оборачиваете тегами img. Я отредактировал ваш пост, можете посмотреть, как это сделано, нажав кнопку «Изменить».<br /></p><div class="quotebox"><cite>ppss42 пишет:</cite><blockquote><p>работает, но  к сожалению с ошибками</p></blockquote></div><p>Попробуйте так:<br /></p><div class="codebox"><pre><code>#If hWnd := WinActive(&quot;ahk_class CabinetWClass&quot;)
~LButton::
   if (A_PriorHotkey = A_ThisHotkey &amp;&amp; A_TimeSincePriorHotkey &lt; 400 &amp;&amp; IsEmptySpaceUnderCusor())
      NavigateToParentDir(hWnd)
   Return
#If

IsEmptySpaceUnderCusor() {
   Return AccObjectFromPoint().accRole(0) = (ROLE_SYSTEM_LIST := 0x21)
}

AccObjectFromPoint(ByRef childId = &quot;&quot;, x = &quot;&quot;, y = &quot;&quot;) {
   static VT_DISPATCH := 9, F_OWNVALUE := 1, h := DllCall(&quot;LoadLibrary&quot;, &quot;Str&quot;, &quot;oleacc&quot;, &quot;Ptr&quot;)
   AccObject := 0
   (x = &quot;&quot; || y = &quot;&quot;) ? DllCall(&quot;GetCursorPos&quot;, &quot;Int64P&quot;, pt) : pt := x &amp; 0xFFFFFFFF | y &lt;&lt; 32
   VarSetCapacity(varChild, 8 + A_PtrSize*2, 0)
   if DllCall(&quot;oleacc\AccessibleObjectFromPoint&quot;, &quot;Int64&quot;, pt, &quot;PtrP&quot;, pAcc, &quot;Ptr&quot;, &amp;varChild) = 0
      childId := NumGet(varChild, 8, &quot;UInt&quot;), AccObject := ComObject(VT_DISPATCH, pAcc, F_OWNVALUE)
   Return AccObject
}

NavigateToParentDir(hWnd) {
   static comType := (VT_ARRAY := 0x2000) | (VT_UI1 := 0x11)
   Shell := ComObjCreate(&quot;Shell.Application&quot;)
   for Window in Shell.Windows {
      if (hWnd = Window.hwnd) {
         Folder := Window.Document.Folder
         parentDirPath := Folder.ParentFolder.Self.Path
         break
      }
   }
   if parentDirPath {
      DllCall(&quot;shell32\SHParseDisplayName&quot;, &quot;WStr&quot;, parentDirPath, &quot;Ptr&quot;, 0, &quot;PtrP&quot;, PIDL, &quot;UInt&quot;, 0, &quot;Ptr&quot;, 0)
      ilSize := DllCall(&quot;shell32\ILGetSize&quot;, &quot;Ptr&quot;, PIDL, &quot;UInt&quot;)
      VarSetCapacity(SAFEARRAY, 16 + A_PtrSize*2, 0)
      NumPut(1     , SAFEARRAY)
      NumPut(1     , SAFEARRAY, 4)
      NumPut(PIDL  , SAFEARRAY, 8 + A_PtrSize)
      NumPut(ilSize, SAFEARRAY, 8 + A_PtrSize*2)
      try Window.Navigate2( ComObject(comType, &amp;SAFEARRAY), 0 )
      DllCall(&quot;shell32\ILFree&quot;, &quot;Ptr&quot;, PIDL)
   }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 19 May 2022 10:00:59 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153273#p153273</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153271#p153271</link>
			<description><![CDATA[<p><span class="postimg"><img src="https://i.imgur.com/Kv9hY09.png" alt="https://i.imgur.com/Kv9hY09.png" /></span></p>]]></description>
			<author><![CDATA[null@example.com (ppss42)]]></author>
			<pubDate>Thu, 19 May 2022 06:00:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153271#p153271</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153270#p153270</link>
			<description><![CDATA[<p>Сделайте скриншот сообщения об ошибке.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 19 May 2022 05:42:03 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153270#p153270</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153269#p153269</link>
			<description><![CDATA[<p><strong>teadrinker</strong> Даже не думал что будет решение. Опробовал скрипт, работает, но&nbsp; к сожалению с ошибками. После открытия нескольких папок выходит ошибка на 11 строке, где нужно вернуть значение из функции. Появляется в момент double клика по папке.</p>]]></description>
			<author><![CDATA[null@example.com (ppss42)]]></author>
			<pubDate>Thu, 19 May 2022 02:56:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153269#p153269</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153263#p153263</link>
			<description><![CDATA[<p>Вижу, без поллитра не разберётесь. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>#If hWnd := WinActive(&quot;ahk_class CabinetWClass&quot;)
~LButton::
   if (A_PriorHotkey = A_ThisHotkey &amp;&amp; A_TimeSincePriorHotkey &lt; 400 &amp;&amp; IsEmptySpaceUnderCusor())
      NavigateToParentDir(hWnd)
   Return
#If

IsEmptySpaceUnderCusor() {
   static ROLE_SYSTEM_WINDOW := 0x00000009
   AccObj := AccObjectFromPoint(childId)
   Return (childId ? AccObj : AccObj.accParent).accRole(0) = ROLE_SYSTEM_WINDOW
}

AccObjectFromPoint(ByRef childId = &quot;&quot;, x = &quot;&quot;, y = &quot;&quot;) {
   static VT_DISPATCH := 9, F_OWNVALUE := 1, h := DllCall(&quot;LoadLibrary&quot;, &quot;Str&quot;, &quot;oleacc&quot;, &quot;Ptr&quot;)
   AccObject := 0
   (x = &quot;&quot; || y = &quot;&quot;) ? DllCall(&quot;GetCursorPos&quot;, &quot;Int64P&quot;, pt) : pt := x &amp; 0xFFFFFFFF | y &lt;&lt; 32
   VarSetCapacity(varChild, 8 + A_PtrSize*2, 0)
   if DllCall(&quot;oleacc\AccessibleObjectFromPoint&quot;, &quot;Int64&quot;, pt, &quot;PtrP&quot;, pAcc, &quot;Ptr&quot;, &amp;varChild) = 0
      childId := NumGet(varChild, 8, &quot;UInt&quot;), AccObject := ComObject(VT_DISPATCH, pAcc, F_OWNVALUE)
   Return AccObject
}

NavigateToParentDir(hWnd) {
   static comType := (VT_ARRAY := 0x2000) | (VT_UI1 := 0x11)
   Shell := ComObjCreate(&quot;Shell.Application&quot;)
   for Window in Shell.Windows {
      if (hWnd = Window.hwnd) {
         Folder := Window.Document.Folder
         parentDirPath := Folder.ParentFolder.Self.Path
         break
      }
   }
   if parentDirPath {
      DllCall(&quot;shell32\SHParseDisplayName&quot;, &quot;WStr&quot;, parentDirPath, &quot;Ptr&quot;, 0, &quot;PtrP&quot;, PIDL, &quot;UInt&quot;, 0, &quot;Ptr&quot;, 0)
      ilSize := DllCall(&quot;shell32\ILGetSize&quot;, &quot;Ptr&quot;, PIDL, &quot;UInt&quot;)
      VarSetCapacity(SAFEARRAY, 16 + A_PtrSize*2, 0)
      NumPut(1     , SAFEARRAY)
      NumPut(1     , SAFEARRAY, 4)
      NumPut(PIDL  , SAFEARRAY, 8 + A_PtrSize)
      NumPut(ilSize, SAFEARRAY, 8 + A_PtrSize*2)
      try Window.Navigate2( ComObject(comType, &amp;SAFEARRAY), 0 )
      DllCall(&quot;shell32\ILFree&quot;, &quot;Ptr&quot;, PIDL)
   }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Wed, 18 May 2022 16:47:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153263#p153263</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153262#p153262</link>
			<description><![CDATA[<p><strong>svoboden</strong> Я знаю про эту утилиту, пользовался какое то время (окна по типу вкладок, слишком много настроек). Но не зашла эта утилита, со временем вернулся на проводник Windows. Не хватает для полного счастья, только этой функции.</p>]]></description>
			<author><![CDATA[null@example.com (ppss42)]]></author>
			<pubDate>Wed, 18 May 2022 16:40:17 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153262#p153262</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153261#p153261</link>
			<description><![CDATA[<p>Для проводника есть QTTabBar там есть такая функция.</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Wed, 18 May 2022 16:34:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153261#p153261</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153260#p153260</link>
			<description><![CDATA[<p><strong>svoboden</strong> Да нет, не обязательно ahk. Нужно для личных нужд. Пользовался разными файловыми менеджерами, и там привык к этому действию.</p>]]></description>
			<author><![CDATA[null@example.com (ppss42)]]></author>
			<pubDate>Wed, 18 May 2022 16:32:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153260#p153260</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153259#p153259</link>
			<description><![CDATA[<p>Нужно ahk именно?</p>]]></description>
			<author><![CDATA[null@example.com (svoboden)]]></author>
			<pubDate>Wed, 18 May 2022 16:27:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153259#p153259</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Переход на уровень вверх по double click]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=153258#p153258</link>
			<description><![CDATA[<p><a href="http://forum.script-coding.com/viewtopic.php?id=10427">Библеотека такая</a>.</p>]]></description>
			<author><![CDATA[null@example.com (__Михаил__)]]></author>
			<pubDate>Wed, 18 May 2022 16:21:49 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=153258#p153258</guid>
		</item>
	</channel>
</rss>
