<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Как задать папку для сохранения скриншотов?]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17750&amp;type=atom" />
	<updated>2023-04-21T21:47:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17750</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157787#p157787" />
			<content type="html"><![CDATA[<p><strong>marusa122</strong><br />По ссылке, которую я дал выше, есть примеры. Я бы хотел здесь видеть хотя бы ваши попытки.<br /></p><div class="codebox"><pre><code>folderPath := &quot;C:\Users\mi\Pictures\Screenshots&quot; ; укажите свой путь к папке скриншотов

existing := {} ; сюда будем записывать существующие файлы
Loop, Files, %folderPath%\*.png
{
   existing[A_LoopFileName] := &quot;&quot;
}

Send #{PrintScreen}
Sleep, 2000

Loop, Files, %folderPath%\*.png
{
   if !existing.HasKey(A_LoopFileName) {
      newFilePath := A_LoopFilePath
      break
   }
}

MsgBox % newFilePath</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-04-21T21:47:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157787#p157787</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157786#p157786" />
			<content type="html"><![CDATA[<p><strong>marusa122</strong> На форуме были неоднократно показаны примеры скриншотеров. Можно было бы просто скопировать код, немного изменить да запускать при включении компа.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2023-04-21T21:18:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157786#p157786</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157785#p157785" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, можно пример для особо одаренных, как это делать?..</p>]]></content>
			<author>
				<name><![CDATA[marusa122]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43077</uri>
			</author>
			<updated>2023-04-21T21:14:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157785#p157785</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157784#p157784" />
			<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>2023-04-21T21:01:08Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157784#p157784</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157783#p157783" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, ладно, последнее знаю (наверное...):<br /></p><div class="codebox"><pre><code>FileMove, C:\Пользователи\User1\Изображения\Снимки экрана\, D:\Рабочая папка\Изображения\</code></pre></div><p>Но я понятия не имею, как с помощью Loop, Files можно перечислить скриншоты, появившиеся за последние несколько секунд/минут.</p>]]></content>
			<author>
				<name><![CDATA[marusa122]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43077</uri>
			</author>
			<updated>2023-04-21T20:53:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157783#p157783</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157782#p157782" />
			<content type="html"><![CDATA[<p>И что, даже последний? Не знаете, как файл переместить?<br />Перечислить файлы можно с помощью <a href="https://www.autohotkey.com/docs/v1/lib/LoopFile.htm">Loop, Files</a>.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-04-21T20:48:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157782#p157782</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157781#p157781" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, все, кроме второго...</p>]]></content>
			<author>
				<name><![CDATA[marusa122]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43077</uri>
			</author>
			<updated>2023-04-21T20:45:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157781#p157781</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157780#p157780" />
			<content type="html"><![CDATA[<p>Там 4 пункта, какой именно вызывает затруднения?</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-04-21T20:12:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157780#p157780</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157779#p157779" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong>, расписываюсь в своей некомпетентности... Честно говоря, даже не представляю, как это реализовать.</p>]]></content>
			<author>
				<name><![CDATA[marusa122]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43077</uri>
			</author>
			<updated>2023-04-21T19:44:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157779#p157779</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157777#p157777" />
			<content type="html"><![CDATA[<p>Самый очевидный (но не самый оптимальный) алгоритм такой:<br /></p><ul><li><p>Перед отправкой #{PrintScreen} перечисляете все файлы, находящиеся в данный момент в папке Снимки экрана</p></li><li><p>Отправляете #{PrintScreen}</p></li><li><p>Через небольшое время перечисляете файлы ещё раз, тот, которого раньше не было — новый</p></li><li><p>Перемещаете новый файл в другую папку с нужным названием</p></li></ul><p>Если с этим справитесь, подскажу, как проще.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2023-04-21T18:18:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157777#p157777</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: Как задать папку для сохранения скриншотов?]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=157771#p157771" />
			<content type="html"><![CDATA[<p>Здравствуйте. Есть скрипт: <br /></p><div class="codebox"><pre><code>LWin:
Send, #{PrintScreen}
Return</code></pre></div><p>По умолчанию он сохраняет сделанные скриншоты в папку Снимки экрана.<br />Вопрос: можно ли сделать так, чтобы скрипт сохранял скриншоты, сделанные с его помощью, в какую-нибудь другую папку? Например, D:\Рабочая папка\Изображения. А скриншоты, сделанные просто с помощью Win+PrtSc, когда скрипт не был запущен, продолжили сохраняться в папку Снимки экрана.</p>]]></content>
			<author>
				<name><![CDATA[marusa122]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=43077</uri>
			</author>
			<updated>2023-04-21T14:12:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=157771#p157771</id>
		</entry>
</feed>
