<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Замена двух из трёх значений по нажатию горячей клавиши и вывод]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14833</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14833&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Замена двух из трёх значений по нажатию горячей клавиши и вывод».]]></description>
		<lastBuildDate>Fri, 21 Jun 2019 21:47:02 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Замена двух из трёх значений по нажатию горячей клавиши и вывод]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134742#p134742</link>
			<description><![CDATA[<p><strong>teadrinker</strong><br />Спасибо огромное! То, что нужно</p>]]></description>
			<author><![CDATA[null@example.com (umototomori)]]></author>
			<pubDate>Fri, 21 Jun 2019 21:47:02 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134742#p134742</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена двух из трёх значений по нажатию горячей клавиши и вывод]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134739#p134739</link>
			<description><![CDATA[<p><strong>umototomori</strong>, даже не знаю, как по-простому реализовать, лучше всего действительно использовать IniRead/Write (есть <a href="http://script-coding.com/AutoHotkeyTranslation.html">перевод</a>, если нужно).<br /></p><div class="codebox"><pre><code>filePath = F:\12.txt

NumpadAdd::
NumpadSub::
   if !FileExist(filePath)
      throw Exception(&quot;Файл &quot;&quot;&quot; . filePath . &quot;&quot;&quot; не найден!&quot;)
   
   FileRead, str, % filePath
   if !RegExMatch(str, &quot;(ОГ:\s(\d+))\R(П:\s(\d+))\R(Л:\s(\d+))&quot;, match)
      throw Exception(&quot;Формат записи в файл не соответствует шаблону!&quot;)
   
   str := RegExReplace(str, match1, &quot;ОГ: &quot; . ++match2)
   if InStr(A_ThisHotkey, &quot;Add&quot;)
      str := RegExReplace(str, match3, &quot;П: &quot; . ++match4)
   else
      str := RegExReplace(str, match5, &quot;Л: &quot; . ++match6)
   ; MsgBox, % str
   FileDelete, % filePath
   FileAppend, % str, % filePath
   Return</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 21 Jun 2019 16:54:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134739#p134739</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена двух из трёх значений по нажатию горячей клавиши и вывод]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134732#p134732</link>
			<description><![CDATA[<p>Лучше используйте ини файлы. Iniread и iniwrite вам в помощь.</p>]]></description>
			<author><![CDATA[null@example.com (belyankin12)]]></author>
			<pubDate>Fri, 21 Jun 2019 12:07:45 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134732#p134732</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена двух из трёх значений по нажатию горячей клавиши и вывод]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134729#p134729</link>
			<description><![CDATA[<p><strong>teadrinker</strong> Вот. Вместо того, что бы добавлять к каждой, он суммирует всё в одно число<br /></p><div class="codebox"><pre><code>filePath = F:\12.txt
FileReadLine, Var1, %filePath%, 1
FileReadLine, Var2, %filePath%, 2
FileReadLine, Var3, %filePath%, 3

Var1 = 10
Var2 = 7
Var3 = 3

  NumpadAdd::

		IfNotExist, %filePath%
			FileAppend,0, %filePath%	
		FileReadLine, Var1, %filePath%, 1
		Var := ++Var1
		FileDelete, %filePath%
		FileAppend,%Var1%, %filePath%
		FileReadLine, Var2, %filePath%, 2
		Var := ++Var2
		FileDelete, %filePath%
		FileAppend,%Var2%, %filePath%
	return
   


NumpadSub::
		IfNotExist, %filePath%
			FileAppend,0, %filePath%	
		FileReadLine, Var1, %filePath%, 1
		Var := ++Var1
		FileDelete, %filePath%
		FileAppend,%Var1%, %filePath%
		FileReadLine, Var3, %filePath%, 3
		Var := ++Var3
		FileDelete, %filePath%
		FileAppend,%Var3%, %filePath%
	return
	





</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (umototomori)]]></author>
			<pubDate>Fri, 21 Jun 2019 09:04:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134729#p134729</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Замена двух из трёх значений по нажатию горячей клавиши и вывод]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134716#p134716</link>
			<description><![CDATA[<div class="quotebox"><cite>umototomori пишет:</cite><blockquote><p>всю башку сломал уже</p></blockquote></div><p>Покажите результаты своих усилий.</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Thu, 20 Jun 2019 19:54:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134716#p134716</guid>
		</item>
		<item>
			<title><![CDATA[AHK: Замена двух из трёх значений по нажатию горячей клавиши и вывод]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=134714#p134714</link>
			<description><![CDATA[<p>Помогите, пожалуйста, ламеру, всю башку сломал уже.<br />Имеется условный .txt файл с тремя значениями<br />ОГ: 10<br />П: 7<br />Л: 3<br />Нужно, что бы по нажатии клавиши Numpad + значения ОГ и П получали +1, а по нажатию клавишы Numpad - Значения ОГ и Л получали +1. И вывод в текстовый файл.<br />Заранее спасибо!</p>]]></description>
			<author><![CDATA[null@example.com (umototomori)]]></author>
			<pubDate>Thu, 20 Jun 2019 18:47:08 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=134714#p134714</guid>
		</item>
	</channel>
</rss>
