<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14453</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14453&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Как Выбрать путь сохранения значений из GUI?».]]></description>
		<lastBuildDate>Fri, 28 Dec 2018 19:38:03 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=130689#p130689</link>
			<description><![CDATA[<p><strong>inseption86</strong></p><p>Спасибо!<br />Я немного обновил код, добавив сохранение через проводник:</p><div class="codebox"><pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force 



Gui, +ToolWindow 
Gui, Add, Edit, vEdit r1 w100, %Val%
Gui, Add, Button,  w100 h30 gSave, Сохранить
Gui, Add, Button,  w100 h30 gLoad, Загрузить
Gui, Show,, *****
Return


Save:
GuiControlGet, Edit
FileSelectFile, FileName, S16,%A_Scriptdir%\Profile\, Сохранить профиль, *.txt
FileAppend, 
(
 %Edit%
), %FileName%.txt
return

Load:
FileSelectFile, SelectedFile,, %A_Scriptdir%, Открыть профиль:
FileRead, val, %SelectedFile%
GuiControl,, Edit, %val%
return



GuiClose:
ExitApp</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Clannad5)]]></author>
			<pubDate>Fri, 28 Dec 2018 19:38:03 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=130689#p130689</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=130679#p130679</link>
			<description><![CDATA[<p>Если нужен современный апи с большими возможностями:<br /><a href="https://www.autohotkey.com/boards/viewtopic.php?t=53136">https://www.autohotkey.com/boards/viewtopic.php?t=53136</a></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Fri, 28 Dec 2018 12:10:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=130679#p130679</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=130677#p130677</link>
			<description><![CDATA[<p>Мой косяк, проявил невнимательность. Спасибо за подсказку.</p>]]></description>
			<author><![CDATA[null@example.com (belyankin12)]]></author>
			<pubDate>Fri, 28 Dec 2018 11:54:46 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=130677#p130677</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=130676#p130676</link>
			<description><![CDATA[<p><strong>Clannad5</strong></p><br /><div class="codebox"><pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force 



Gui, +ToolWindow 
Gui, Add, Edit, vEdit r1 w100, %Val%
Gui, Add, Button,  w100 h30 gSave, Сохранить
Gui, Add, Button,  w100 h30 gLoad, Загрузить
Gui, Show,, *****
Return


Save:
GuiControlGet, Edit
FileAppend, %Edit%, % A_Desktop &quot;\&quot; Edit &quot;.txt&quot;   
return


Load:
FileSelectFile, SelectedFile,, %A_Desktop%, Open a file:
FileRead, val, %SelectedFile%
GuiControl,, Edit, %val%
return



GuiClose:
ExitApp</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (inseption86)]]></author>
			<pubDate>Fri, 28 Dec 2018 11:35:34 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=130676#p130676</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=130674#p130674</link>
			<description><![CDATA[<p>Попробуйте почитать справку. Уже существуют стандартные формы для чтения файла и сохранения файла.</p>]]></description>
			<author><![CDATA[null@example.com (ypppu)]]></author>
			<pubDate>Fri, 28 Dec 2018 11:00:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=130674#p130674</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=130673#p130673</link>
			<description><![CDATA[<p><strong>belyankin12</strong></p><div class="codebox"><pre><code>#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.
#SingleInstance force 



Gui, +ToolWindow 
Gui, Add, Edit, r1 w100, ********
Gui, Add, Edit, r1 w100, ********
Gui, Add, Button,  w100 h30 gSave, Сохранить
Gui, Add, Button,  w100 h30 gLoad, Загрузить
Gui, Show,, *****
Return


Save:
FileSelectFile, FileName, S, %A_Desktop%, Create a new file:

if FileName !=
    MsgBox,  %FileName%
return




Load:
FileSelectFile, SelectedFile,, %A_Desktop%, Open a file:

if SelectedFile !=
    MsgBox, %SelectedFile%
return

GuiClose:
ExitApp</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (inseption86)]]></author>
			<pubDate>Fri, 28 Dec 2018 10:52:57 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=130673#p130673</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=130671#p130671</link>
			<description><![CDATA[<p><strong>belyankin12</strong></p><p>Нашел в одном вики-примере этот код:</p><div class="codebox"><pre><code>; Example: This is a working script that writes some text to a file then reads it back into memory.
; It provides the same functionality as this DllCall-example.

FileSelectFile, FileName, S16,, Create a new file:
if (FileName = &quot;&quot;)
    return
file := FileOpen(FileName, &quot;w&quot;)
if !IsObject(file)
{
    MsgBox Can&#039;t open &quot;%FileName%&quot; for writing.
    return
}
TestString := &quot;This is a test string.`r`n&quot;  ; When writing a file this way, use `r`n rather than `n to start a new line.
file.Write(TestString)
file.Close()

; Now that the file was written, read its contents back into memory.
file := FileOpen(FileName, &quot;r-d&quot;) ; read the file (&quot;r&quot;), share all access except for delete (&quot;-d&quot;)
if !IsObject(file)
{
    MsgBox Can&#039;t open &quot;%FileName%&quot; for reading.
    return
}
CharsToRead := StrLen(TestString)
TestString := file.Read(CharsToRead)
file.Close()
MsgBox The following string was read from the file: %TestString%</code></pre></div><br /><p>Он открывает проводник для сохранения, но я точно не знаю что за что отвечает.</p><p>Вот ссылка на эту информацию:<br /><a href="https://autohotkey.com/docs/commands/FileOpen.htm">https://autohotkey.com/docs/commands/FileOpen.htm</a></p>]]></description>
			<author><![CDATA[null@example.com (Clannad5)]]></author>
			<pubDate>Fri, 28 Dec 2018 09:19:51 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=130671#p130671</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=130670#p130670</link>
			<description><![CDATA[<p>Как раз хотел создать подобную тему, ибо к сожалению ничего не нашел похожего. Мне необходимо вызвать окно &quot;Обзор&quot;, где я выбираю какой-либо файл или папку. Необходимо получить путь к выбранной папке, файлу. Прошу ваших советов.</p>]]></description>
			<author><![CDATA[null@example.com (belyankin12)]]></author>
			<pubDate>Fri, 28 Dec 2018 07:49:17 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=130670#p130670</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Как Выбрать путь сохранения значений из GUI?]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=130667#p130667</link>
			<description><![CDATA[<p>Здравствуйте!</p><p>Имеется вопрос:</p><p>Возможно ли внутри AHK использовать проводник, для сохранения значений, которые я укажу в параметре?</p><br /><div class="codebox"><pre><code>Gui, Add, Edit, x46 y37 w240 h20 , %Val%</code></pre></div><p> </p><p>Есть цель:</p><p>Добавить несколько строк Edit и две кнопки &quot;Сохранить&quot; и &quot;Загрузить&quot;.</p><p>Нужно, чтобы при нажатие на кнопку GUI &quot;Сохранить&quot;, у меня открывался проводник, где я смогу выбрать путь до сохранения файла, аналогично с&nbsp; загрузкой файла, со всеми значениями %Val1% %Val2% и т.д, через Абзац.</p><p>Помогите, пожалуйста!</p>]]></description>
			<author><![CDATA[null@example.com (Clannad5)]]></author>
			<pubDate>Fri, 28 Dec 2018 07:19:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=130667#p130667</guid>
		</item>
	</channel>
</rss>
