<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBScript: очистка экрана консоли (аналог CLS/Clear Screen)]]></title>
	<link rel="self" href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=9349&amp;type=atom" />
	<updated>2014-03-11T07:40:17Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.script-coding.com/viewtopic.php?id=9349</id>
		<entry>
			<title type="html"><![CDATA[VBScript: очистка экрана консоли (аналог CLS/Clear Screen)]]></title>
			<link rel="alternate" href="http://forum.script-coding.com/viewtopic.php?pid=80670#p80670" />
			<content type="html"><![CDATA[<p>Процедура «CLS» демонстрирует очистку экрана консоли — по аналогии с командой «CLS» (Clear Screen) в пакетных файлах:<br /></p><div class="codebox"><pre><code>Option Explicit

WScript.Echo &quot;Первая строка&quot;
WScript.Echo &quot;Вторая строка&quot;
WScript.Echo &quot;Третья строка&quot;
WScript.Sleep 3000

CLS

WScript.Echo &quot;Четвёртая строка&quot;
WScript.Echo &quot;Пятая строка&quot;
WScript.Echo &quot;Шестая строка&quot;
WScript.Sleep 3000

WScript.Quit 0
&#039;=============================================================================

&#039;=============================================================================
Sub CLS()
    Const WshRunning  = 0
    Const WshFinished = 1
    Const WshFailed   = 2
    
    With WScript.CreateObject(&quot;WScript.Shell&quot;).Exec(&quot;mode.com con: lines=0&quot;)
        If .Status &lt;&gt; WshFailed Then
            If .Status = WshRunning Then
                Do Until .Status = WshFinished
                    .StdOut.ReadAll
                    .StdErr.ReadAll
                    
                    WScript.Sleep 100
                Loop
            End If
        End If
    End With
End Sub
&#039;=============================================================================
</code></pre></div><p>Автор идеи — <strong>wisgest</strong>. Отдельное спасибо — <strong>Rumata</strong>.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>http://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2014-03-11T07:40:17Z</updated>
			<id>http://forum.script-coding.com/viewtopic.php?pid=80670#p80670</id>
		</entry>
</feed>
