<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: первый показ msgbox]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=18328&amp;type=atom" />
	<updated>2024-11-19T17:22:23Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=18328</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161766#p161766" />
			<content type="html"><![CDATA[<p>Есть, спасибо, сработало!</p>]]></content>
			<author>
				<name><![CDATA[Сергей Ачкасов]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=44219</uri>
			</author>
			<updated>2024-11-19T17:22:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161766#p161766</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161765#p161765" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>в начале скрипта проверяйте, был ли передан параметр, в зависимости от этого выполняйте дальнейшие действия</p></blockquote></div><div class="codebox"><pre><code>#SingleInstance Force
if !A_Args[1] {
   MsgBox Скрипт запущен первый раз
}
Gui, Show, w300 h300
return

GuiClose() {
   ExitApp
}

^2:: Run, %A_ScriptFullPath% param</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-11-19T16:01:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161765#p161765</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161764#p161764" />
			<content type="html"><![CDATA[<p>Вобщем взял за основу код из того поста:<br /></p><div class="codebox"><pre><code>#SingleInstance Off
SetTitleMatchMode, 2
DetectHiddenWindows, On

if A_Args[1]
   MsgBox, 64, Готово, Script запущен!
else {
   WinGet, list, List, %A_ScriptName% ahk_class AutoHotkey
   found := false
   Loop % list
      continue
   until list%A_Index% != A_ScriptHwnd &amp;&amp; found := true
   
   if !found
      MsgBox, 64, Готово, Script запущен!
   else {
      MsgBox, 48, Перезапуск, Выполняется перезапуск Script. Программа будет открыта через несколько секунд..., 2
      Run, % A_ScriptFullPath . &quot; 1&quot;
      ExitApp
   }
}

^2::
reload
return</code></pre></div><p>При включении скрипта он выдает msgbox: &quot;Готово, Script запущен!&quot;, и так же при перезагрузке скрипта он выдает тоже самое, как будто код был вот таким:<br /></p><div class="codebox"><pre><code>msgbox, 64, Готово, Script запущен!

^2::
reload
return</code></pre></div><p>Также я сделал второй вариант, который работает как надо , но только двумя ахк-скриптами.<br />Первый:<br /></p><div class="codebox"><pre><code>Gui, color, FFEBCD
Gui, Font, S8 С8B4513, Verdana
Gui, Font, S20 с8B4513, Verdana
Gui, Add, Button, x132 y249 w200 h80 gctrlevent vbotton1, Понял, принял
Gui, Font, S20 C8B4513, Verdana
Gui, Add, Text, x62 y29 w350 h100 , Добро пожаловать в мой скрипт`, справкка открывается на клавишу
Gui, Font, S20 C006400, Verdana
Gui, Add, Text, x192 y149 w80 h30 , Insert
; Generated using SmartGUI Creator 4.0
Gui, Show, x603 y184 h379 w479, &quot; &quot;

ctrlevent(ctrlhwnd:=0, guievent:=&quot;&quot;, eventinfo:=&quot;&quot;) {
Gui, Button:
gui, Destroy
guiclose:
run %a_workingdir%/ahk.ahk
exitapp
}
return

^2::
reload
return</code></pre></div><p>Он запускает интерфейс в котором просто текст и кнопка выключения его самого и перехода во второй скрипт. Главный вопрос в том как мне сделать не два таких скрипта, а все в одном? По итогу из отправленного поста ничего не сработало , ни один из вариантов.</p>]]></content>
			<author>
				<name><![CDATA[Сергей Ачкасов]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=44219</uri>
			</author>
			<updated>2024-11-19T15:09:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161764#p161764</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161763#p161763" />
			<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>2024-11-19T14:14:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161763#p161763</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161762#p161762" />
			<content type="html"><![CDATA[<p>Вобщем, не работает этот пример , создает msgbox всегда в начале, и при первом включении, и при перезапуске.</p>]]></content>
			<author>
				<name><![CDATA[Сергей Ачкасов]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=44219</uri>
			</author>
			<updated>2024-11-19T12:55:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161762#p161762</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161761#p161761" />
			<content type="html"><![CDATA[<p>Я так понимаю, параметр не был передан, т.к. создается снова начальный msgbox.</p>]]></content>
			<author>
				<name><![CDATA[Сергей Ачкасов]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=44219</uri>
			</author>
			<updated>2024-11-19T12:46:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161761#p161761</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161760#p161760" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Сергей Ачкасов пишет:</cite><blockquote><p>Вы серьезно?</p></blockquote></div><p>А вы? Вам же уже вроде было сделано замечание. Повторно нарушая правила, вы демонстрируете неуважение к форуму. Если хотите получать помощь в дальнейшем, пожалуйста, будьте внимательнее.<br /></p><div class="quotebox"><cite>Сергей Ачкасов пишет:</cite><blockquote><p>при выполнении команды reload</p></blockquote></div><p>Вам не обязательно перезагружать скрипт именно командой reload. Просто перезапускайте скрипт с параметром, как показано в примере, а в начале скрипта проверяйте, был ли передан параметр, в зависимости от этого выполняйте дальнейшие действия.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-11-19T12:29:31Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161760#p161760</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161759#p161759" />
			<content type="html"><![CDATA[<p>Я понимаю , что это сто процентов легко сделать, просто не могу найти команду для этого , нигде не написано.</p>]]></content>
			<author>
				<name><![CDATA[Сергей Ачкасов]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=44219</uri>
			</author>
			<updated>2024-11-19T12:14:38Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161759#p161759</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161758#p161758" />
			<content type="html"><![CDATA[<p>Вы серьезно? Нет бы помочь , мы про точку в конце предложения разговор ведем. Я понимаю , что грамотно нужно писать , можно было бы в одно сообщение как то и помочь и обратить внимание на эту точку...</p>]]></content>
			<author>
				<name><![CDATA[Сергей Ачкасов]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=44219</uri>
			</author>
			<updated>2024-11-19T12:12:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161758#p161758</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161757#p161757" />
			<content type="html"><![CDATA[<p><strong>Сергей Ачкасов</strong>, потеряли точку в конце предложения.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2024-11-19T11:50:06Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161757#p161757</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161755#p161755" />
			<content type="html"><![CDATA[<p>То как показано в этом посте не работает , все равно выскакивает msgbox при выполнении команды reload.</p>]]></content>
			<author>
				<name><![CDATA[Сергей Ачкасов]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=44219</uri>
			</author>
			<updated>2024-11-19T11:13:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161755#p161755</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161752#p161752" />
			<content type="html"><![CDATA[<p>Возможность такая есть, на форуме искать надо.<br />Например <a href="https://forum.script-coding.com/viewtopic.php?pid=157646#p157646">в этом посте</a>.</p>]]></content>
			<author>
				<name><![CDATA[__Михаил__]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=40928</uri>
			</author>
			<updated>2024-11-17T18:14:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161752#p161752</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: первый показ msgbox]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=161751#p161751" />
			<content type="html"><![CDATA[<p>Здравствуйте. Как сделать так чтоб при первом включении скрипта показывался msgbox , а при выполнении команды reload этот msgbox не выскакивал как при первом запуске? Есть ли возможность это реализовать?</p>]]></content>
			<author>
				<name><![CDATA[Сергей Ачкасов]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=44219</uri>
			</author>
			<updated>2024-11-17T14:11:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=161751#p161751</id>
		</entry>
</feed>
