<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: Математические  действия]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10887&amp;type=atom" />
	<updated>2015-08-21T15:30:52Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10887</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96713#p96713" />
			<content type="html"><![CDATA[<p>Тоже такое придумал, но решил, что нерационально как-то. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-08-21T15:30:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96713#p96713</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96711#p96711" />
			<content type="html"><![CDATA[<p>Если математикой и без условий, то можно ещё так отрезать.<br /></p><div class="codebox"><pre><code>x := 2 ; знаков после запятой
n := 1.999999
MsgBox % Round(((#:=n*10**x)-mod(#,1))*10**-x,x) </code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-08-21T15:28:23Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96711#p96711</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96687#p96687" />
			<content type="html"><![CDATA[<p>Просто создаётся один подшаблон вместо двух. Через Format() удаётся только округлить:<br /></p><div class="codebox"><pre><code>n := 460.086362
MsgBox, % Format(&quot;{:.2f}&quot;, n)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-08-21T09:52:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96687#p96687</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96677#p96677" />
			<content type="html"><![CDATA[<p>Да не знаю, что в голову пришло. А в чём б<span class="bbu">о</span>льшая правильность?<br />И как-то можно это сделать с помощью функции Format?</p>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-08-21T01:34:47Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96677#p96677</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96675#p96675" />
			<content type="html"><![CDATA[<p>Почему не так:<br /></p><div class="codebox"><pre><code>n := 460.086362
MsgBox % RegExReplace(n, &quot;(\d+\.\d{2}).*&quot;, &quot;$1&quot;) </code></pre></div>]]></content>
			<author>
				<name><![CDATA[teadrinker]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=24515</uri>
			</author>
			<updated>2015-08-21T01:28:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96675#p96675</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96672#p96672" />
			<content type="html"><![CDATA[<p>Спасибо большое за помощь ! <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2015-08-21T00:14:41Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96672#p96672</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96671#p96671" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>MsgBox % SubStr(n, 1, InStr(n, &quot;.&quot;)+2)  ; отрезать</code></pre></div><p>Этот пример не корректен, правильнее так:<br /></p><div class="codebox"><pre><code>n := 460.086362
MsgBox % RegExReplace(n, &quot;(\d+)(\.\d{2}).*&quot;, &quot;$1$2&quot;) </code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-08-20T22:37:01Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96671#p96671</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96670#p96670" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>a := 39.849
b := 43.306
c := 500

n := Round((a/b)*c, 2)

MsgBox % n  </code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-08-20T22:31:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96670#p96670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96669#p96669" />
			<content type="html"><![CDATA[<p>А с переменными&nbsp; вместо&nbsp; чисел&nbsp; как реализовать&nbsp; подскажите пожалуйста.</p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2015-08-20T22:27:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96669#p96669</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96668#p96668" />
			<content type="html"><![CDATA[<p>Огромнейшее спасибо !!!</p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2015-08-20T21:51:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96668#p96668</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96667#p96667" />
			<content type="html"><![CDATA[<p><a href="http://www.script-coding.com/AutoHotkey/Functions.html#_9">В какой такой справке нету.</a><br /></p><div class="codebox"><pre><code>n := (39.849/43.306)*500
MsgBox % Round(n, 2) ; округлить
MsgBox % SubStr(n, 1, InStr(n, &quot;.&quot;)+2)  ; отрезать</code></pre></div><p>Не используйте MsgBox, сохраняйте результат в переменную как:</p><div class="codebox"><pre><code>n := (39.849/43.306)*500</code></pre></div>]]></content>
			<author>
				<name><![CDATA[serzh82saratov]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27879</uri>
			</author>
			<updated>2015-08-20T21:40:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96667#p96667</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96665#p96665" />
			<content type="html"><![CDATA[<p>В справке такого нету(<br />Да и есче вопрос&nbsp; как сократить&nbsp; с 460,086362&nbsp; к&nbsp; 460,08 ?</p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2015-08-20T21:25:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96665#p96665</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96663#p96663" />
			<content type="html"><![CDATA[<p>Спасибо огромное&nbsp; !&nbsp; Хоть я и не понял как но работает.</p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2015-08-20T21:19:29Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96663#p96663</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96662#p96662" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><div class="quotebox"><blockquote><p>Я вас не понял...</p><p>результат должен&nbsp; быть 460,08</p></blockquote></div><p>Не заметил запятые:<br /></p><div class="codebox"><pre><code>MsgBox % (39.849/43.306)*500</code></pre></div><p>Как и вы ошибку в слове: </p><div class="quotebox"><blockquote><p>Матаматические</p></blockquote></div></blockquote></div><p>Извиняюсь, исправил.</p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2015-08-20T21:13:22Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96662#p96662</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: Математические  действия]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=96661#p96661" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Читайте <a href="http://script-coding.com/AutoHotkey/Variables.1.0.46.07.html">здесь</a>.</p></blockquote></div><p>Именно здесь я и ничего не нашел.</p>]]></content>
			<author>
				<name><![CDATA[Zanoza]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26155</uri>
			</author>
			<updated>2015-08-20T21:12:19Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=96661#p96661</id>
		</entry>
</feed>
