<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=4369&amp;type=atom" />
	<updated>2013-05-15T11:35:46Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=4369</id>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=72127#p72127" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>smaharbA пишет:</cite><blockquote><p>AcroReader работает с джабоскриптом в усерспейсе</p></blockquote></div><p>Если не трудно, опишите пожалуйста подробнее, или укажите ссылку.</p>]]></content>
			<author>
				<name><![CDATA[workonw]]></name>
			</author>
			<updated>2013-05-15T11:35:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=72127#p72127</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=57220#p57220" />
			<content type="html"><![CDATA[<p>AcroReader работает с джабоскриптом в усерспейсе</p>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2012-02-25T10:04:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=57220#p57220</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=57219#p57219" />
			<content type="html"><![CDATA[<p>Печатать-то, может и печатал, а вот отследить момент завершения печати не удавалось. То ли он не закрывался в конце.</p><p><a href="http://forum.script-coding.com/search.php?action=search&amp;keywords=pdf&amp;author=&amp;forum=14&amp;search_in=all&amp;sort_by=0&amp;sort_dir=DESC&amp;show_as=topics">Поищите</a>, уже было.</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-02-25T09:51:50Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=57219#p57219</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=57215#p57215" />
			<content type="html"><![CDATA[<p>Раньше adobereader с ключом /p печатал файлы, сейчас нет ?</p>]]></content>
			<author>
				<name><![CDATA[Евген]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25253</uri>
			</author>
			<updated>2012-02-25T07:11:27Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=57215#p57215</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=57214#p57214" />
			<content type="html"><![CDATA[<p>Под печать PDF потребуются сторонние средства. Вы готовы к этому?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2012-02-25T06:22:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=57214#p57214</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=57213#p57213" />
			<content type="html"><![CDATA[<p>а как переделать этот скрипт под pdf файлы</p>]]></content>
			<author>
				<name><![CDATA[a_lobachev]]></name>
			</author>
			<updated>2012-02-25T05:43:14Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=57213#p57213</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=53632#p53632" />
			<content type="html"><![CDATA[<p>Подскажите пожалуйста, если кто слышит <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /><br />Как подредактировать этот скрипт автоматической печати для распечатывания PDF файлов?</p>]]></content>
			<author>
				<name><![CDATA[ChemistE]]></name>
			</author>
			<updated>2011-11-18T00:28:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=53632#p53632</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=43534#p43534" />
			<content type="html"><![CDATA[<p>А как бы сделать чтобы программа не завершала работу? И что бы печатала, по две копии каждого файла?</p>]]></content>
			<author>
				<name><![CDATA[msc_nv]]></name>
			</author>
			<updated>2011-01-11T09:42:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=43534#p43534</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=39725#p39725" />
			<content type="html"><![CDATA[<p>Спасибо большое!!!!<br />Всё работает, все довольные <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Sandril]]></name>
			</author>
			<updated>2010-09-28T04:43:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=39725#p39725</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=39721#p39721" />
			<content type="html"><![CDATA[<p>1)</p><div class="quotebox"><cite>Sandril пишет:</cite><blockquote><p>Очень полезный скрипт, спасибо большое!!!!<br />А как избавиться от постоянно всплывающего окна с вопросом о прекращении работы скрипта. Хочу чтобы он работал постоянно...</p></blockquote></div><p>Просто уберите в скрипте участок кода:<br /></p><div class="codebox"><pre><code>  If Minute(Time)=0 and Second(Time)&lt;5 then &#039;условие проверки времени для вывода на экран вопроса о завершении своей работы
     ques=wssh.Popup(&quot;Не желаете завершить работу скрипта автопечати документов?&quot;&amp;vbCrLf&amp;&quot;Следующий запрос будет через час...&quot;,, &quot;Скрипт автопечати | Lucky edited&quot;, 36)
     if ques=6 then WScript.Quit
     WScript.Sleep 5000
  End If</code></pre></div><p>2)</p><div class="quotebox"><cite>Sandril пишет:</cite><blockquote><p>...или прекращал работу через 3 часа, но без диалога с оператором <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p></blockquote></div><p>пункт №1 плюс замените в скрипте <strong>Do</strong> на:<br /></p><div class="codebox"><pre><code>Dim t1
t1=timer
Do while (timer-t1)/3600 &lt; 3</code></pre></div><p>p.s: Не забудьте убрать на первой строке определение переменной <em>ques</em></p>]]></content>
			<author>
				<name><![CDATA[Lucky]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25698</uri>
			</author>
			<updated>2010-09-27T19:23:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=39721#p39721</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=39706#p39706" />
			<content type="html"><![CDATA[<p>Очень полезный скрипт, спасибо большое!!!!<br />А как избавиться от постоянно всплывающего окна с вопросом о прекращении работы скрипта. Хочу чтобы он работал постоянно или прекращал работу через 3 часа, но без диалога с оператором <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Sandril]]></name>
			</author>
			<updated>2010-09-27T04:32:35Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=39706#p39706</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=34700#p34700" />
			<content type="html"><![CDATA[<p>Пожалуйста! Рад помочь... <img src="//forum.script-coding.com/img/smilies/wink.png" width="15" height="15" /></p><div class="quotebox"><cite>lemuriec пишет:</cite><blockquote><p>... Но я кажется придумал решение этой проблемы)<br />Програмка будет копировать файлы с сервера на локалку, а оттуда уже будет работать Ваш скрипт))</p></blockquote></div><p>Я догадался (увидел следующую вашу тему) <img src="//forum.script-coding.com/img/smilies/big_smile.png" width="15" height="15" /></p>]]></content>
			<author>
				<name><![CDATA[Lucky]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25698</uri>
			</author>
			<updated>2010-04-14T08:37:28Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=34700#p34700</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=34698#p34698" />
			<content type="html"><![CDATA[<p>Спасибо Вам большое))</p><p>Единственное с сервера не возможно распечатать(... Но я кажется придумал решение этой проблемы)<br />Програмка будет копировать файлы с сервера на локалку, а оттуда уже будет работать Ваш скрипт))</p><p>Ан тут можно как то выражать благодарность участнику форума?)</p>]]></content>
			<author>
				<name><![CDATA[lemuriec]]></name>
			</author>
			<updated>2010-04-14T08:25:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=34698#p34698</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=34694#p34694" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>lemuriec пишет:</cite><blockquote><p>Адрес следующий&nbsp; &quot;\\Servermon\общая\ОТДЕЛ ЭКОНОМИЧЕСКОГО АНАЛИЗА И ПРОГНОЗИРОВАНИЯ\Ochered&quot;</p></blockquote></div><p>Странно, но у меня аналогичное работает... Полагаю у вас в компьютерах установлены Microsoft Office...</p><p>Вот подобие на Excel, остается соединить и отшлифовать...<br /></p><div class="codebox"><pre><code>Option Explicit : Dim objWord, objDoc, wssh, objFS, objPath, objFolder, objItem, ques
Const wdDoNotSaveChanges    =  0
Const wdPromptToSaveChanges = -2
Const wdSaveChanges         = -1

Set wssh = CreateObject(&quot;WScript.Shell&quot;)
Set objFS = CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set objPath = objFS.GetFolder(&quot;d:\doc\&quot;) &#039;Папка, из которой производится печать

Do
  PrintDelInFolder objPath
  WScript.Sleep 1000
  If Minute(Time)=0 and Second(Time)&lt;5 then &#039;условие проверки времени для вывода на экран вопроса о завершении своей работы
     ques=wssh.Popup(&quot;Не желаете завершить работу скрипта автопечати документов?&quot;&amp;vbCrLf&amp;&quot;Следующий запрос будет через час...&quot;,, &quot;Скрипт автопечати | Lucky edited&quot;, 36)
     if ques=6 then WScript.Quit
     WScript.Sleep 5000
  End If
Loop

Sub PrintDelInFolder(objFolder)
    For Each objItem In objFolder.Files
        If StrComp(objFS.GetExtensionName(objItem.Name), &quot;xls&quot;, vbTextCompare) = 0 Then
            With WScript.CreateObject(&quot;Excel.Application&quot;)
                Set objDoc = .Workbooks.Open(objItem.Path)
                objDoc.PrintOut
                .Quit
                Set objDoc = Nothing
                WScript.Sleep 500
                objFS.DeleteFile objItem.Path &#039;,true &#039;если надо удалять и доки с атрибутом &quot;Только чтение&quot; - уберите символ &#039; перед true
            End With
        End If
    Next
End Sub

Set objWord = Nothing
WScript.Quit 0</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Lucky]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=25698</uri>
			</author>
			<updated>2010-04-14T07:33:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=34694#p34694</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBS: Автоматическая печать из указанной папки с последующим удалением]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=34684#p34684" />
			<content type="html"><![CDATA[<p>У скрипта не знаю. Но на сервере нет пароля. и я спокойно сам могу удалять файлы с сервера. Может в скрипте это надо где то прописать? Я извиняюсь... я в программировании мало что понимаю)) наверное для многих мои слова кажутся смешными)) и все таки как это решить?</p>]]></content>
			<author>
				<name><![CDATA[lemuriec]]></name>
			</author>
			<updated>2010-04-14T05:59:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=34684#p34684</id>
		</entry>
</feed>
