<?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=6217&amp;type=atom" />
	<updated>2011-09-18T12:16:58Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6217</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: округление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51652#p51652" />
			<content type="html"><![CDATA[<p><strong>creature.ws</strong> спасибо.</p>]]></content>
			<author>
				<name><![CDATA[Вадим]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27175</uri>
			</author>
			<updated>2011-09-18T12:16:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51652#p51652</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: округление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51556#p51556" />
			<content type="html"><![CDATA[<p>Не могу подобрать подходящих случаю слов <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>
size = 123123
Msgbox % Round(size := size/1000, 2)
size := 123123
Msgbox % Round(size := size/1000, 2)
size := &quot;123123&quot;
Msgbox % Round(size := size/1000, 2)
size := 123123q
Msgbox % Round(size := size/1000, 2)
size = 123123q
Msgbox % Round(size := size/1000, 2)</code></pre></div><p>Может быть пример выше вам поможет разобраться.</p>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2011-09-16T14:44:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51556#p51556</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: округление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51552#p51552" />
			<content type="html"><![CDATA[<p>Не пашет, вставляю после <br /></p><div class="codebox"><pre><code>size := (size/1000)</code></pre></div><p>Думаю, причина в том, что переменная size - текст, потому округление не возможно. Как решить проблему (перевести текст в число)?</p>]]></content>
			<author>
				<name><![CDATA[Вадим]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27175</uri>
			</author>
			<updated>2011-09-16T12:58:18Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51552#p51552</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: округление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51520#p51520" />
			<content type="html"><![CDATA[<p>Ну там где «ошибка» там и причина ошибки написана <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br /></p><div class="codebox"><pre><code>Round(size, 2)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[creature.ws]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26105</uri>
			</author>
			<updated>2011-09-14T18:14:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51520#p51520</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: округление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51515#p51515" />
			<content type="html"><![CDATA[<p>и че, ошибка:<br /></p><div class="codebox"><pre><code>Round(%size%, 2)</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Вадим]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27175</uri>
			</author>
			<updated>2011-09-14T17:13:12Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51515#p51515</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: округление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51514#p51514" />
			<content type="html"><![CDATA[<p><a href="http://www.script-coding.com/AutoHotkey/Functions.html"><strong>Функции</strong> --&gt; Общая математика</a></p>]]></content>
			<author>
				<name><![CDATA[ypppu]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=5974</uri>
			</author>
			<updated>2011-09-14T16:55:54Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51514#p51514</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: округление переменной]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=51512#p51512" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>!w::
x = %clipboard%
send {f2}
sleep 100
send {LControl down}
send {c}
send {LControl up}
send {enter}
FileGetSize, size, %A_ScriptDir%\%clipboard%.rar, K

if (size&lt;1000)
    z = %size% Кб
if (size&gt;=1000)
    {
    size := (size/1000)

    z = %size% Мб
    }
clipboard = %x%
return
!e::
send %z%
return</code></pre></div><p>программа, которая запоминает размер файла, который находится в папке со скриптом. Ее не нужно совершенствовать, просто есть один момент:<br /></p><div class="codebox"><pre><code>if (size&gt;=1000)
    {
    size := (size/1000)

    z = %size% Мб</code></pre></div><p>Читается так (очевидно но все же): если размер больше 1 мб, значит нужно в вывести в мб. <br />И так вопрос: как округлить переменною %size% до сотых. Задача элементарная, вот только найти негде не могу. Спасибо</p>]]></content>
			<author>
				<name><![CDATA[Вадим]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27175</uri>
			</author>
			<updated>2011-09-14T16:24:34Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=51512#p51512</id>
		</entry>
</feed>
