<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: GUI подскажите как совместить и исправить скрип по замене данных]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=17351&amp;type=atom" />
	<updated>2022-08-31T20:17:24Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=17351</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI подскажите как совместить и исправить скрип по замене данных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154596#p154596" />
			<content type="html"><![CDATA[<p><strong>plastbit22</strong>, ознакомьтесь, пожалуйста, с <a href="https://forum.script-coding.com/misc.php?action=rules">Правилами</a>, отредактируйте <a href="https://forum.script-coding.com/viewtopic.php?pid=154594#p154594">свой пост</a>. Обратите внимание на правила <a href="https://forum.script-coding.com/misc.php?action=rules#quotation">цитирования</a>.<br />Прочитайте правила целиком и постарайтесь запомнить, чтобы в следующий раз не приходилось делать замечаний.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-08-31T20:17:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154596#p154596</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI подскажите как совместить и исправить скрип по замене данных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154595#p154595" />
			<content type="html"><![CDATA[<p>Я разобрался как это сделать, спасибо всем. </p><div class="codebox"><pre><code>{
; Generated by Auto-GUI 3.0.1
#SingleInstance Force
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1

IniRead, id1, data/info.ini, USER, id1
IniRead, id2, data/info.ini, USER, id2

Gui Font, s9, Segoe UI, Bold, Arial
Gui Add, Button, x43 y97 w102 h34 gSave, Save
Gui Add, Edit, x8 y6 w93 h25 vid1, %id1%
Gui Add, Edit, x7 y41 w93 h26 vid2, %id2%
Gui Add, Text, x104 y7 w73 h22 +0x200, id1
Gui Add, Text, x104 y42 w73 h24 +0x200, id2

Gui Show, w188 h144, Window
Return

GuiEscape:
GuiClose:
    ExitApp

Save:
Gui, submit, nohide
IniWrite %id1%, data/info.ini, USER, id1
IniWrite %id2%, data/info.ini, USER, id2
return
}

{
sc2B::    ;  &quot;\&quot;

WinActivate, ahk_pid %id2%

Send, {sc57}    ;  &quot;F11&quot;

WinActivate, ahk_pid %id1%
Return
}

</code></pre></div>]]></content>
			<author>
				<name><![CDATA[plastbit22]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42771</uri>
			</author>
			<updated>2022-08-31T18:49:04Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154595#p154595</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI подскажите как совместить и исправить скрип по замене данных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154594#p154594" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><div class="codebox"><pre><code>WinActivate, ahk_pid 1452
WinActivate, ahk_pid 7480</code></pre></div><p>Здесь ID процессов указаны числами, но они не константы, они всегда разные.</p></blockquote></div><p>Я понимаю что он будет постоянно разный, по этому и&nbsp; хочу создать GUI окно чтобы просто тут да вписывать (id процессов), чтобы постоянно не запускать и не редактировать скрипт.</p>]]></content>
			<author>
				<name><![CDATA[plastbit22]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42771</uri>
			</author>
			<updated>2022-08-31T18:33:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154594#p154594</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: GUI подскажите как совместить и исправить скрип по замене данных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154593#p154593" />
			<content type="html"><![CDATA[<p>Не особо понятно что и как должно быть, но явные ошибки:<br /></p><div class="codebox"><pre><code>IniWrite, %id11% data/info.egl, USER, id1
IniWrite, %id22% data/info.egl, USER, id2</code></pre></div><p>Здесь запятые пропущены.<br /></p><div class="codebox"><pre><code>WinActivate, ahk_pid 1452
WinActivate, ahk_pid 7480</code></pre></div><p>Здесь ID процессов указаны числами, но они не константы, они всегда разные.</p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2022-08-31T18:17:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154593#p154593</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: GUI подскажите как совместить и исправить скрип по замене данных]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=154582#p154582" />
			<content type="html"><![CDATA[<p>Здраствуйте, помогите пожалуйста.<br />Я сделал GUI окно, в нем есть 2 строки&nbsp; ID 1 и ID 2, попытался сделать так чтобы при&nbsp; заполнении их данными, эти данные сохранялись при нажатие кнопки сохранить, в другой части скрипта. </p><p> </p><div class="codebox"><pre><code>; 
; Generated by Auto-GUI 3.0.1
#SingleInstance Force
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
IniRead, id1, data/info.egl, USER, id1
IniRead, id2, data/info.egl, USER, id2

Gui Font, s9, Segoe UI
Gui Add, Button, x43 y97 w102 h34 gSave, Save
Gui Add, Edit, x8 y6 w93 h25 vid11, %id1%
Gui Add, Edit, x7 y41 w93 h26 vid22, %id2%
Gui Add, Text, x104 y7 w73 h22 +0x200, ID 1
Gui Add, Text, x104 y42 w73 h24 +0x200, ID 2

Gui Show, w188 h144, Window
Return

GuiEscape:
GuiClose:
    ExitApp

Save:
Gui, submit, nohide
IniWrite, %id11% data/info.egl, USER, id1
IniWrite, %id22% data/info.egl, USER, id2
return
</code></pre></div><p>2 скрипт <br /></p><div class="codebox"><pre><code>
{
sc2B::    ;  &quot;\&quot;

WinActivate, ahk_pid 1452 ; PID 2

Send, {sc57}    ;  &quot;F11&quot;

WinActivate, ahk_pid 7480 ; PID 1
Return
}</code></pre></div><p>Как должно работать но не работает,&nbsp; я вожу данные в id1 и он заменяет ahk_pid %тут числа% (PID 2),&nbsp; вожу данные в id2 и он заменяет ahk_pid %тут числа% (PID 2) нажимаю сохранить&nbsp; и он&nbsp; заменяет в WinActivate, ahk_pid (1 и 2 окно).</p><p>Заранее спасибо.</p>]]></content>
			<author>
				<name><![CDATA[plastbit22]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=42771</uri>
			</author>
			<updated>2022-08-31T14:36:25Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=154582#p154582</id>
		</entry>
</feed>
