<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: if FileExist()]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13692&amp;type=atom" />
	<updated>2018-05-09T06:23:55Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13692</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125260#p125260" />
			<content type="html"><![CDATA[<p>Просто пропишите в начале скрипта:<br /></p><div class="codebox"><pre><code>SetWorkingDir %A_ScriptDir%</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-05-09T06:23:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125260#p125260</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125259#p125259" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, переменные воспринимаются как путь(я могу попробовать прописать %a_scriptdir% в среду винды.), если без кавычек при компиляции ошибка &quot;illegal symbol&quot;</p>]]></content>
			<author>
				<name><![CDATA[Limon4ek]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38982</uri>
			</author>
			<updated>2018-05-09T05:36:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125259#p125259</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125248#p125248" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Limon4ek пишет:</cite><blockquote><p>Malcev, этот алиас же по умолчанию, или нет?</p></blockquote></div><p>Нет. По умолчанию A_WorkingDir, а она может отличаться от A_ScriptDir.<br /></p><div class="quotebox"><cite>Limon4ek пишет:</cite><blockquote><p>там нельзя вообще использовать переменные.</p></blockquote></div><p>На счёт этого не понял.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-05-08T19:54:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125248#p125248</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125247#p125247" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>
;main code
FileAppend, какой-то текст, % A_ScriptDir &quot;\file.txt&quot;
if(Exist(&quot;file.txt&quot;))
	msgbox #1
if(Exist(A_ScriptDir &quot;\file.txt&quot;))
	msgbox #2
return





Exist(path) {
	ifexist, % path
		return 1
	return 0
}
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[MandarinKa02]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=34409</uri>
			</author>
			<updated>2018-05-08T19:45:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125247#p125247</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125245#p125245" />
			<content type="html"><![CDATA[<p><strong>powercat</strong>,тогда оно не воспринимает a_scriptdir как переменную.</p>]]></content>
			<author>
				<name><![CDATA[Limon4ek]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38982</uri>
			</author>
			<updated>2018-05-08T19:42:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125245#p125245</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125244#p125244" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, этот алиас же по умолчанию, или нет? Да и дело не в этом, там нельзя вообще использовать переменные.</p>]]></content>
			<author>
				<name><![CDATA[Limon4ek]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38982</uri>
			</author>
			<updated>2018-05-08T19:41:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125244#p125244</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125240#p125240" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>if FileExist(A_ScriptDir . &quot;/file.file&quot;)
{
MsgBox, Hello World
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[powercat]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=37884</uri>
			</author>
			<updated>2018-05-08T19:13:44Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125240#p125240</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125238#p125238" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>SetWorkingDir %A_ScriptDir%</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2018-05-08T19:11:33Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125238#p125238</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125237#p125237" />
			<content type="html"><![CDATA[<p><strong>ypppu</strong>, странно, у меня просто всегда возвращает FALSE. Значится это у меня на аппаратном уровне.</p>]]></content>
			<author>
				<name><![CDATA[Limon4ek]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38982</uri>
			</author>
			<updated>2018-05-08T19:06:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125237#p125237</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125236#p125236" />
			<content type="html"><![CDATA[<p>Что Вы этим хотели сказать? У меня работает с относительным путём.<br /></p><div class="codebox"><pre><code>IF FileExist(&quot;1/file.file&quot;){
SoundBeep
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2018-05-08T19:05:36Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125236#p125236</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: if FileExist()]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=125235#p125235" />
			<content type="html"><![CDATA[<p>Доброго времени суток. Суть трабла:<br /></p><div class="codebox"><pre><code>if FileExist(&quot;/file.file&quot;){
...
}</code></pre></div><p>вот такое не пройдёт, ибо в аргументах нужно указывать полный путь, но положение скрипта иногда меняется между дисками и следовательно полный путь тут не пройдёт. Сокращение при помощи %A_scriptdir% и любых других переменных не работает.</p>]]></content>
			<author>
				<name><![CDATA[Limon4ek]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38982</uri>
			</author>
			<updated>2018-05-08T18:59:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=125235#p125235</id>
		</entry>
</feed>
