<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBScript: Время "Незакрываемости" скрпита]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=7255&amp;type=atom" />
	<updated>2012-06-12T14:09:45Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=7255</id>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60895#p60895" />
			<content type="html"><![CDATA[<p>Ааа..я понял, это просто функция POPUP&#039;а<br /></p><div class="codebox"><pre><code>Set a = CreateObject(&quot;Wscript.Shell&quot;)
aa=InputBox(&quot;Введите число секунд, через которые следующие окно самостояетельно закроется&quot;,&quot;Время&quot;)
a.popup &quot;Это сообщение исчезнет через &quot;&amp;aa&amp;&quot; секунд(ы)&quot;,aa,&quot;Почему?&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[-TOXA-]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28061</uri>
			</author>
			<updated>2012-06-12T14:09:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60895#p60895</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60778#p60778" />
			<content type="html"><![CDATA[<p>А через MessageBox можно так сделать?!</p>]]></content>
			<author>
				<name><![CDATA[-TOXA-]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28061</uri>
			</author>
			<updated>2012-06-05T20:34:13Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60778#p60778</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60742#p60742" />
			<content type="html"><![CDATA[<p>+ месаджбокс удобен когда надо сделать модальное для системы окно</p>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2012-06-04T11:10:10Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60742#p60742</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60741#p60741" />
			<content type="html"><![CDATA[<p>попап если не активен может не считать время, старая песня</p>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2012-06-04T11:08:42Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60741#p60741</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60657#p60657" />
			<content type="html"><![CDATA[<p><strong>alexii</strong>,хм..Сейчас закрылся,а тогда я 14 минут ждал,и безрезультатно:(</p>]]></content>
			<author>
				<name><![CDATA[-TOXA-]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28061</uri>
			</author>
			<updated>2012-06-01T17:24:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60657#p60657</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60656#p60656" />
			<content type="html"><![CDATA[<p><strong>-TOXA-</strong>, тогда странно, почему у Вас не закрывается окно сообщения из кода, приведённого в посте <a href="http://forum.script-coding.com/viewtopic.php?pid=60638#p60638">#7</a>. У меня оно закрывается без каких-либо действий пользователя через заданные 60 секунд.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-06-01T17:02:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60656#p60656</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60650#p60650" />
			<content type="html"><![CDATA[<p><strong>alexii</strong>,Сначала высвечивается <em>&quot;Текст&quot;</em>, а через пять секунд высвечивается <em>&quot;-1&quot;</em>,У меня тоже XP SP3..</p>]]></content>
			<author>
				<name><![CDATA[-TOXA-]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28061</uri>
			</author>
			<updated>2012-06-01T15:38:30Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60650#p60650</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60647#p60647" />
			<content type="html"><![CDATA[<p><strong>-TOXA-</strong>, у меня Windows XP SP3. Работает.</p><p>С каким результатом у Вас исполнится такое:<br /></p><div class="codebox"><pre><code>Option Explicit

Dim objWshShell

Set objWshShell = WScript.CreateObject(&quot;WScript.Shell&quot;)

WScript.Echo objWshShell.Popup(&quot;Текст&quot;, 5, &quot;Заголовок&quot;, vbOKOnly + vbInformation)

Set objWshShell = Nothing

WScript.Quit 0</code></pre></div>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-06-01T15:17:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60647#p60647</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60638#p60638" />
			<content type="html"><![CDATA[<p><strong>alexii</strong>, Извините:), но когда я даже убрал из скрипта + &amp;H40000, и у меня получилось:<br /></p><div class="codebox"><pre><code>Option Explicit

Dim objWshShell

Dim intTime4Show
Dim intMinimumTime
Dim intTimeStartShowing
Dim intRetValue

Set objWshShell = WScript.CreateObject(&quot;WScript.Shell&quot;)
intTime4Show    = 60
intMinimumTime  = 10                
intTimeStartShowing = Timer                                                

Do
intRetValue = objWshShell.Popup( _
&quot;Здесь&quot; &amp; vbCrLf &amp; &quot;некий&quot; &amp; vbCrLf &amp; &quot;текст&quot;, _
intTime4Show - (Timer - intTimeStartShowing), _
&quot;Тут заголовок&quot;, _
vbOKOnly + vbInformation)
Loop Until intRetValue = -1 Or (Timer - intTimeStartShowing) &gt; intMinimumTime

Set objWshShell = Nothing

WScript.Quit 0</code></pre></div><p>Опять не закрывается, либо я что-то не правильно сделал, либо на разных ОС VBS функции различны, как например <em>открытие диалога</em> на Windows 7</p>]]></content>
			<author>
				<name><![CDATA[-TOXA-]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28061</uri>
			</author>
			<updated>2012-06-01T11:49:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60638#p60638</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60632#p60632" />
			<content type="html"><![CDATA[<p><strong>-TOXA-</strong>, я Вас поздравляю — у меня нынче тоже не закрывается <img src="//forum.script-coding.com/img/smilies/lol.png" width="15" height="15" />. А раньше-то работало <img src="//forum.script-coding.com/img/smilies/sad.png" width="15" height="15" />. Опытным путём выяснил, что если убрать вывод окна поверх остальных окон (MB_TOPMOST — «+ &amp;H40000»), то работает как надо и теперь. Интересно, какое из обновлений могло привести к такому изменению поведения?!</p><p>Добавил замечание по обнаруженному Вами поведению в пост в Коллекции. Спасибо!</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-31T22:45:39Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60632#p60632</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60630#p60630" />
			<content type="html"><![CDATA[<p><strong>alexii</strong>,Извините,но скрипт по ссылке не закрывается через 10 секунд..или опять компьютер глючит..Но я уже жду 15 минут,и он не закрывается,только при нажатии Ок после 10 секунд.:)</p>]]></content>
			<author>
				<name><![CDATA[-TOXA-]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28061</uri>
			</author>
			<updated>2012-05-31T21:50:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60630#p60630</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60627#p60627" />
			<content type="html"><![CDATA[<p><strong>-TOXA-</strong>, в приведённом Вами скрипте окно сообщения MessageBox не закроется ни через 20 секунд, ни через 20 часов. Оно не закроется, пока пользователь не нажмёт «OK».</p><p>В скрипте же по ссылке окно MessageBox в любом случае закроется через заданное время, <em>независимо от действий пользователя</em>.</p><p>Но основное там — минимальное время показа; именно это пожелание участника, задавшего вопрос, вызвало данную реализацию и появление скрипта в Коллекции.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-31T21:15:02Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60627#p60627</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60626#p60626" />
			<content type="html"><![CDATA[<p><strong>alexii</strong>, В том скрипте, как я понял, msgbox не будет закрываться 10 секунд, в моем случае не закрывается 20 секунд. А почему Вы сказали: &quot;Не перестанет.&quot;?У меня вроде все нормально работает:)Или у меня просто компьютер особенный?:)Проверьте, пожалуйста, может все-таки будет нормально работать?:)Или хотя бы объясните почему не будет:(Я ведь новичок:)</p>]]></content>
			<author>
				<name><![CDATA[-TOXA-]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28061</uri>
			</author>
			<updated>2012-05-31T21:01:17Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60626#p60626</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60624#p60624" />
			<content type="html"><![CDATA[<p><strong>-TOXA-</strong>, значит, Вы действительно не поняли суть <a href="http://forum.script-coding.com/viewtopic.php?id=2801">того</a> скрипта. Просто попробуйте его запустить <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" /> — станет ясно.</p><div class="quotebox"><blockquote><div class="codebox"><pre><code>If Time &lt; b Then MsgBox &quot;Это сообщение перестанет высвечиваться через 20 секнд после включения&quot;</code></pre></div></blockquote></div><p>Не перестанет.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-05-31T20:15:45Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60624#p60624</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBScript: Время "Незакрываемости" скрпита]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=60622#p60622" />
			<content type="html"><![CDATA[<p>Я уже видел подобное <a href="http://forum.script-coding.com/viewtopic.php?id=2801">здесь</a> ,но я тут написал скрипт, который, по моему мнению, легче выглядит, и нормально работает,в этом скрипте может разобраться любой новичок (хотя я сам такой).Работа скрипта состоит в том, что на время скрипт не будет выключатся. Поставить время работы скрипта можно от нескольких секунд,до нескольких лет.Вообщем смотрите, комментируйте, исправляйте ошибки=)</p><br /><div class="codebox"><pre><code>Dim a,b
a=Time
b=TimeSerial(Hour(a),Minute(a),Second(a)+20)
Do
If Time &lt; b Then MsgBox &quot;Это сообщение перестанет высвечиваться через 20 секнд после включения&quot;
If Time &gt;= b Then Wscript.Quit
Loop</code></pre></div>]]></content>
			<author>
				<name><![CDATA[-TOXA-]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=28061</uri>
			</author>
			<updated>2012-05-31T20:01:59Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=60622#p60622</id>
		</entry>
</feed>
