<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK (Help2AHK_L): Определение текущего пути в окне Проводника]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=6474&amp;type=atom" />
	<updated>2011-11-24T08:32:14Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6474</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK (Help2AHK_L): Определение текущего пути в окне Проводника]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=53794#p53794" />
			<content type="html"><![CDATA[<p>Спасибо.<br />OFF: И тяжкий же это труд — перейти на AHK_L...</p>]]></content>
			<author>
				<name><![CDATA[DD]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25263</uri>
			</author>
			<updated>2011-11-24T08:32:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=53794#p53794</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK (Help2AHK_L): Определение текущего пути в окне Проводника]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=53785#p53785" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>F11::
   hWnd:=WinExist(&quot;A&quot;)
   WinGetClass wClass, % &quot;ahk_id&quot;hWnd
   If (wClass!=&quot;ExploreWClass&quot; And wClass!=&quot;CabinetWClass&quot;)
      MsgBox Используйте только в окне Проводника!
   Else
      MsgBox, % ExplorerPath(hWnd)
   Return

ExplorerPath(_hwnd)
{
   For Item In ComObjCreate(&quot;Shell.Application&quot;).Windows
      If (Item.hWnd=_hwnd)
         Return, LTrim(Item.LocationURL, &quot;file:///&quot;)
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Grey]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25792</uri>
			</author>
			<updated>2011-11-23T22:07:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=53785#p53785</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK (Help2AHK_L): Определение текущего пути в окне Проводника]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=53784#p53784" />
			<content type="html"><![CDATA[<p>Скрипт из Коллекции. На <em>AHK_L</em> ни гу-гу, — конвертнуть бы.</p><div class="codebox"><pre><code>
F11::
  hWnd := WinExist(&quot;A&quot;) 
  WinGetClass wClass, ahk_id %hWnd% 
  If (wClass != &quot;ExploreWClass&quot; and wClass != &quot;CabinetWClass&quot;) 
     MsgBox Используйте только в окне Проводника! 
  Else 
     MsgBox % GetWindowsExplorerPath(hWnd) 
Return

;=================================================

GetWindowsExplorerPath(_hWnd) 
{ 
   local pid, hMem, pv, pidl, pidl?, explorerPath 

   If (A_OSType = &quot;WIN32_NT&quot;) 
   { 
      pid := DllCall(&quot;GetCurrentProcessId&quot;) 
      SendMessage 0x400 + 12   ; CWM_GETPATH = WM_USER + 12 
            , pid, 0, , ahk_id %_hWnd% 
      hMem := ErrorLevel 
      if (hMem != 0) 
      { 
         pv := DllCall(&quot;Shell32\SHLockShared&quot; 
            , &quot;UInt&quot;, hMem, &quot;UInt&quot;, pid) 
         if (pv != 0) 
         { 
            pidl := DllCall(&quot;Shell32\ILClone&quot;, &quot;UInt&quot;, pv) 
            DllCall(&quot;Shell32\SHUnlockShared&quot;, &quot;UInt&quot;, pv) 
         } 
         DllCall(&quot;Shell32\SHFreeShared&quot; 
            , &quot;UInt&quot;, hMem, &quot;UInt&quot;, pid) 
      } 
   } 
   VarSetCapacity(explorerPath, 512, 0) 
   DllCall(&quot;Shell32\SHGetPathFromIDList&quot; 
      , &quot;UInt&quot;, pidl, &quot;Str&quot;, explorerPath) 
   Return explorerPath 
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[DD]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25263</uri>
			</author>
			<updated>2011-11-23T20:09:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=53784#p53784</id>
		</entry>
</feed>
