<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Внесение текста в AHK скрипт через Edit GUI]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=16808</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=16808&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Внесение текста в AHK скрипт через Edit GUI».]]></description>
		<lastBuildDate>Wed, 08 Dec 2021 12:30:03 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Внесение текста в AHK скрипт через Edit GUI]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=151082#p151082</link>
			<description><![CDATA[<p>Мне кажется проще использовать &#039;FileSelectFile&#039; и вызывать его по кнопке в трее допустим.<br /></p><div class="codebox"><pre><code>#Persistent

Menu, Tray, NoStandard
Menu, Tray, Add, % &quot;Select file&quot;, selectFile
Menu, Tray, add
Menu, Tray, Add, % &quot;Close script&quot;, closeScript

global logFile := &quot;&quot;

selectFile()

setTimer, readLog, 50
return

readLog()
{
	if (!logFile)
		return

	loop, read, % logFile
        last_line  := A_LoopReadLine

    If last_line contains Unknown command. Type &quot;help&quot; for help.
    {
        Send {t}
        Sleep 1000
        Send, /skyblock
        SendInput {enter}
        Sleep 3000
        Send {space down}
        Sleep 50
        Send {space up}
        Sleep 50
        Send {space down}
        Sleep 50 
        Send {space up}
        Sleep 2000
    }
}

selectFile()
{
	FileSelectFile, selectedFile, 3,, Select log file, Log file (*.txt; *.log)
	if (errorLevel)
	{
		return
	}

	if (!selectedFile)
	{
		selectFile()
	}

	logFile := selectFile
}

closeScript()
{
	exitApp
}</code></pre></div><p>В вашем варианте, я думаю можно попробовать так:<br /></p><div class="codebox"><pre><code>Gui, Add, Edit, x12 y7 w451 h57 vText, test ; окно Edit, где я записываю путь к файлу
Gui, Add, Button, x12 y74 w134 h38 gKey , apply
Gui, Show, w479 h153, Untitled GUI
return

Key:
Gui, Submin, NoHide
return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Phoenixxx_Czar)]]></author>
			<pubDate>Wed, 08 Dec 2021 12:30:03 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=151082#p151082</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Внесение текста в AHK скрипт через Edit GUI]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=151051#p151051</link>
			<description><![CDATA[<p>Здравствуйте, мне нужна помощь со скриптом AHK</p><p>Код:<br /></p><div class="codebox"><pre><code>Gui, Add, Edit, x12 y7 w451 h57 vText, test ; окно Edit, где я записываю путь к файлу
Gui, Add, Button, x12 y74 w134 h38 gKey , apply
Gui, Show, w479 h153, Untitled GUI
return

Key:
GuiControlGet, Text
?
?

GuiClose:
ExitApp

loop
{
	loop, read, %Text%  ; здесь нужно вставить то, что я написал в edit
        last_line  := A_LoopReadLine
        If last_line contains Unknown command. Type &quot;help&quot; for help.
        {
        Send {t}
        Sleep 1000
        Send, /skyblock
        SendInput {enter}
        Sleep 3000
        Send {space down}
        Sleep 50
        Send {space up}
        Sleep 50
        Send {space down}
        Sleep 50 
        Send {space up}
        Sleep 2000
        }
}
F2:: pause
</code></pre></div><p>Обыскал форум вдоль и поперёк, ничего схожего с моей задачей я не нашел. Если вы мне поможете со скриптом или поможете найти соответствующую тему, я буду очень благодарен. </p><p>Что мне нужно: </p><p>есть gui меню, где в edit я пишу путь к&nbsp; файлу n. Нужно сделать так, чтобы при нажатии на apply в gui, то, что я написал в edit, перенеслось в 	loop, read, %Text%.</p>]]></description>
			<author><![CDATA[null@example.com (Mokson)]]></author>
			<pubDate>Tue, 07 Dec 2021 17:11:49 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=151051#p151051</guid>
		</item>
	</channel>
</rss>
