<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; АХК: добавление в автозагрузку]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=13370&amp;type=atom" />
	<updated>2018-04-21T16:06:18Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=13370</id>
		<entry>
			<title type="html"><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124844#p124844" />
			<content type="html"><![CDATA[<p><strong>teadrinker</strong> Спасибо. Работает.</p>]]></content>
			<author>
				<name><![CDATA[Vicoriyan]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38658</uri>
			</author>
			<updated>2018-04-21T16:06:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124844#p124844</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124828#p124828" />
			<content type="html"><![CDATA[<p>Если внешние файлы находятся в папке скрипта, попробуйте так:<br /></p><div class="codebox"><pre><code>#Include %A_ScriptDir%
#Include MyScript.ahk</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2018-04-20T14:42:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124828#p124828</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=124810#p124810" />
			<content type="html"><![CDATA[<p>Такая проблема. При ручном запуске все библиотеки и внешние файлы подгружаются нормально. Когда происходит автозапуск, ошибка загрузки библиотек и внешних файлов.<br />Прописывал:<br /></p><div class="codebox"><pre><code>SetWorkingDir % A_ScriptDir</code></pre></div><p>Не помогает. Прописывать в #Include полный путь - не вариант.<br />Есть какие-то другие варианты?</p>]]></content>
			<author>
				<name><![CDATA[Vicoriyan]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=38658</uri>
			</author>
			<updated>2018-04-19T19:36:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=124810#p124810</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123057#p123057" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2018-01-13T13:54:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123057#p123057</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123056#p123056" />
			<content type="html"><![CDATA[<p>Где иконка скрывается нашел, спасибо огромное. Можешь описать что за что отвечает, чтобы я понимал что и куда вставляю. <strong>stealzy</strong></p>]]></content>
			<author>
				<name><![CDATA[bsmolz]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39003</uri>
			</author>
			<updated>2018-01-13T13:17:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123056#p123056</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123054#p123054" />
			<content type="html"><![CDATA[<p>А можешь пожалуйста описать что за что отвечает, и как скрыть иконку запускаемого приложения в трее. <strong>stealzy</strong></p>]]></content>
			<author>
				<name><![CDATA[bsmolz]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39003</uri>
			</author>
			<updated>2018-01-13T13:16:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123054#p123054</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: АХК: добавление в автозагрузку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123052#p123052" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[stealzy]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=31937</uri>
			</author>
			<updated>2018-01-13T12:14:56Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123052#p123052</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[АХК: добавление в автозагрузку]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=123050#p123050" />
			<content type="html"><![CDATA[<p>Всем привет. Вопрос такой уважаемые знатоки:<br />Как в ахк сделать авто добавление этого ахк в автозагрузку при первом запуске<br />и удаление по нажатию &quot;End&quot;. Если кто нибудь может сделать с меня плюха.</p><p>Если можно вопрос в вопросе задам.</p><p>АХК добавился в авто загрузку. После запуска Windows (любого с любым пользователем) программа открывается и как сделать так чтобы он себя из трея скрывала ?!</p><p>P.S Тема уже была но там как-то не понятно.</p>]]></content>
			<author>
				<name><![CDATA[bsmolz]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=39003</uri>
			</author>
			<updated>2018-01-13T09:36:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=123050#p123050</id>
		</entry>
</feed>
