<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; АХК: добавление в автозагрузку]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=13370</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13370&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «АХК: добавление в автозагрузку».]]></description>
		<lastBuildDate>Sat, 21 Apr 2018 16:06:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124844#p124844</link>
			<description><![CDATA[<p><strong>teadrinker</strong> Спасибо. Работает.</p>]]></description>
			<author><![CDATA[null@example.com (Vicoriyan)]]></author>
			<pubDate>Sat, 21 Apr 2018 16:06:18 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124844#p124844</guid>
		</item>
		<item>
			<title><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124828#p124828</link>
			<description><![CDATA[<p>Если внешние файлы находятся в папке скрипта, попробуйте так:<br /></p><div class="codebox"><pre><code>#Include %A_ScriptDir%
#Include MyScript.ahk</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 20 Apr 2018 14:42:29 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124828#p124828</guid>
		</item>
		<item>
			<title><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=124810#p124810</link>
			<description><![CDATA[<p>Такая проблема. При ручном запуске все библиотеки и внешние файлы подгружаются нормально. Когда происходит автозапуск, ошибка загрузки библиотек и внешних файлов.<br />Прописывал:<br /></p><div class="codebox"><pre><code>SetWorkingDir % A_ScriptDir</code></pre></div><p>Не помогает. Прописывать в #Include полный путь - не вариант.<br />Есть какие-то другие варианты?</p>]]></description>
			<author><![CDATA[null@example.com (Vicoriyan)]]></author>
			<pubDate>Thu, 19 Apr 2018 19:36:04 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=124810#p124810</guid>
		</item>
		<item>
			<title><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=123057#p123057</link>
			<description><![CDATA[<p>Без меню в трее:<br /></p><div class="codebox"><pre><code>#NoTrayIcon
IniRead FirstRun, % A_ScriptName &quot;.ini&quot;, Pref, FirstRun, 1
If FirstRun
	IniWrite % AutoRun(&quot;On&quot;), % A_ScriptName &quot;.ini&quot;, Pref, FirstRun
Run explorer %A_StartupCommon%
Return

End::AutoRun(&quot;Off&quot;)
Home::AutoRun(&quot;On&quot;)
Tab::AutoRun(&quot;Toggle&quot;)
Esc::ExitApp

AutoRun(p) {
	ShortcutPath := A_StartupCommon &quot;\&quot; A_ScriptName &quot;.lnk&quot;

	If (p = &quot;On&quot;)
		FileCreateShortcut % A_ScriptFullPath, % ShortcutPath, &quot;%A_ScriptDir%&quot;
	Else If (p = &quot;Off&quot;)
		FileDelete % ShortcutPath
	Else If (p = &quot;Toggle&quot;)
		FileExist(ShortcutPath) ? AutoRun(&quot;Off&quot;) : AutoRun(&quot;On&quot;)
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (stealzy)]]></author>
			<pubDate>Sat, 13 Jan 2018 13:54:28 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=123057#p123057</guid>
		</item>
		<item>
			<title><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=123056#p123056</link>
			<description><![CDATA[<p>Где иконка скрывается нашел, спасибо огромное. Можешь описать что за что отвечает, чтобы я понимал что и куда вставляю. <strong>stealzy</strong></p>]]></description>
			<author><![CDATA[null@example.com (bsmolz)]]></author>
			<pubDate>Sat, 13 Jan 2018 13:17:52 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=123056#p123056</guid>
		</item>
		<item>
			<title><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=123054#p123054</link>
			<description><![CDATA[<p>А можешь пожалуйста описать что за что отвечает, и как скрыть иконку запускаемого приложения в трее. <strong>stealzy</strong></p>]]></description>
			<author><![CDATA[null@example.com (bsmolz)]]></author>
			<pubDate>Sat, 13 Jan 2018 13:16:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=123054#p123054</guid>
		</item>
		<item>
			<title><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=123052#p123052</link>
			<description><![CDATA[<div class="codebox"><pre><code>; Menu Tray, NoIcon
Menu Tray, NoStandard
Menu Tray, Add, % AutoRun(&quot;MenuIni&quot;), AutoRun
Menu Tray, Add, Выход, _Exit

IniRead FirstRun, % A_ScriptName &quot;.ini&quot;, Pref, FirstRun, 1
If FirstRun
	IniWrite % AutoRun(&quot;On&quot;), % A_ScriptName &quot;.ini&quot;, Pref, FirstRun
Return

End::AutoRun(&quot;Off&quot;)
Esc::
_Exit:
	ExitApp

AutoRun(p:=&quot;Toggle&quot;) {
	static tAdd := &quot;Добавить в автозагрузку&quot;, tRem := &quot;Убрать из автозагрузки&quot;
	ShortcutPath := A_StartupCommon &quot;\&quot; A_ScriptName &quot;.lnk&quot;

	If e:=FileExist(ShortcutPath) {
		FileGetShortcut % ShortcutPath, linkTarget,, linkParam
		If (linkTarget != A_ScriptFullPath)
			FileCreateShortcut % A_ScriptFullPath, % ShortcutPath, &quot;%A_ScriptDir%&quot;
			; If AHK not install - FileCreateShortcut &quot;%A_AHKPath%&quot;, % ShortcutPath, &quot;%A_ScriptDir%&quot;, &quot;%A_ScriptFullPath%&quot;
	}

	If (p = &quot;MenuIni&quot;)
		Return e ? tRem : tAdd

	If e {
		If (p != &quot;On&quot;)
			FileDelete % ShortcutPath
		Else
			ErrorLevel := true
	}
	Else {
		If (p != &quot;Off&quot;)
			FileCreateShortcut % A_ScriptFullPath, % ShortcutPath, &quot;%A_ScriptDir%&quot;
		Else
			ErrorLevel := true
	}

	If Not ErrorLevel
		Menu Tray, Rename, % e ? tRem : tAdd, % e ? tAdd : tRem
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (stealzy)]]></author>
			<pubDate>Sat, 13 Jan 2018 12:14:56 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=123052#p123052</guid>
		</item>
		<item>
			<title><![CDATA[АХК: добавление в автозагрузку]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=123050#p123050</link>
			<description><![CDATA[<p>Всем привет. Вопрос такой уважаемые знатоки:<br />Как в ахк сделать авто добавление этого ахк в автозагрузку при первом запуске<br />и удаление по нажатию &quot;End&quot;. Если кто нибудь может сделать с меня плюха.</p><p>Если можно вопрос в вопросе задам.</p><p>АХК добавился в авто загрузку. После запуска Windows (любого с любым пользователем) программа открывается и как сделать так чтобы он себя из трея скрывала ?!</p><p>P.S Тема уже была но там как-то не понятно.</p>]]></description>
			<author><![CDATA[null@example.com (bsmolz)]]></author>
			<pubDate>Sat, 13 Jan 2018 09:36:52 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=123050#p123050</guid>
		</item>
	</channel>
</rss>
