<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: For_loop_Gui]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=16886&amp;type=atom" />
	<updated>2022-01-16T11:17:23Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=16886</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151673#p151673" />
			<content type="html"><![CDATA[<p>Теоретически, называть ключи именами папок неправильно. У вас там при переборе применяется рекурсия в подпапки, так что ничего не мешает названиям папок повторяться.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-01-16T11:17:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151673#p151673</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151671#p151671" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Да, спасибо!!</p><div class="codebox"><pre><code>
Person_Array := {}
for index, element in Array_folder 
{
    file_name := RegExReplace(element, &quot;.+\\(.+)\.*.{0}&quot;, &quot;$1&quot;)
    Person_Array[File_name] := element 

    Gui, Add, Button, gGetName x+100 y10, % file_name
}
Gui, Show, , ***
return  
       
GetName:
GuiControlGet, var,, % A_GuiControl
gui,destroy

msgbox, % Person_Array[var] &quot;_&quot; var

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2022-01-16T10:14:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151671#p151671</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151670#p151670" />
			<content type="html"><![CDATA[<p>Наверно, это имели в виду:<br /></p><div class="codebox"><pre><code>Folder := A_Desktop &quot;\Test\&quot; TimeString 

Array_folder := [] 
Loop, Files, % Folder &quot;\*&quot;, D
{
   if A_LoopFileAttrib not contains H
      Array_folder.Push(A_LoopFileFullPath)
}

Gui, +ToolWindow  +AlwaysOnTop 
Gui, Font, s15 italic

arr := []
for index, element in Array_folder {
   Gui, Add, Button, gGetName hwndhButton%A_Index%, % RegExReplace(element, &quot;.+\\(.+)\.*.{0}&quot;, &quot;$1&quot;)
   arr[hButton%A_Index%] := element
}

Gui, Show, , ***
return  
    
GetName(hwnd) {
   global arr
   Gui, %A_Gui%:+OwnDialogs
   MsgBox, % arr[hwnd]
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-01-16T09:48:49Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151670#p151670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151667#p151667" />
			<content type="html"><![CDATA[<p>Я не соображу, какого именно поведения вы хотите добиться.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-01-15T20:40:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151667#p151667</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151666#p151666" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Никак не соображу, как получить A_LoopFileFullPath нажатой кнопки.</p>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2022-01-15T19:55:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151666#p151666</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151662#p151662" />
			<content type="html"><![CDATA[<p>Так из массива и узнайте.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-01-15T15:02:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151662#p151662</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151661#p151661" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />На данный момкент в скрипте - как слева на скрине, но так как первоначальная папка содержит подкаталоги и все эти папки отображаются в гуи, то хотел бы узнать их полный путь для дальнейших условий.</p>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2022-01-15T14:57:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151661#p151661</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151660#p151660" />
			<content type="html"><![CDATA[<p>А как вы хотели?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-01-15T14:54:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151660#p151660</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151659#p151659" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Полный путь в Gui - некрасиво)</p>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2022-01-15T14:50:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151659#p151659</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151658#p151658" />
			<content type="html"><![CDATA[<p>В смысле, получилось?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-01-15T14:41:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151658#p151658</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151657#p151657" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong></p>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2022-01-15T14:31:15Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151657#p151657</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151656#p151656" />
			<content type="html"><![CDATA[<p>Убрать RegEx?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-01-15T14:28:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151656#p151656</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151655#p151655" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong><br />Да, в массиве, а в Гуи - название конечной папки. Как получить полный путь, помимо нажатой кнопки (имя конечной папки)</p>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2022-01-15T13:27:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151655#p151655</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151654#p151654" />
			<content type="html"><![CDATA[<p>Непонятно, в чём сложность. Они же у вас в массиве, или я не понял вопроса?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-01-15T13:13:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151654#p151654</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: For_loop_Gui]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=151653#p151653" />
			<content type="html"><![CDATA[<p>Добрый день! Подскажите, пож-та, как получить изначальный путь (A_LoopFileFullPath)</p><div class="codebox"><pre><code>
Folder := % A_Desktop &quot;\Test\&quot; TimeString 

Array_folder := [] 
Loop, Files, % Folder &quot;\*&quot;, DR
{
   if A_LoopFileAttrib not contains H
           Array_folder.Push(A_LoopFileFullPath)
}

Gui, +ToolWindow  +AlwaysOnTop 
Gui, Font, s15 italic

for index, element in Array_folder 
  Gui, Add, Button, gGetName, % RegExReplace(element, &quot;.+\\(.+)\.*.{0}&quot;, &quot;$1&quot;)

Gui, Show, , ***
return  
    
GetName:
GuiControlGet, var,, % A_GuiControl
Gui,destroy
MsgBox % var 
return
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[inseption86]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38818</uri>
			</author>
			<updated>2022-01-15T11:07:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=151653#p151653</id>
		</entry>
</feed>
