<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; JS: Как запустить txt или word файл из скрипта]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=11556&amp;type=atom" />
	<updated>2016-05-04T14:47:03Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=11556</id>
		<entry>
			<title type="html"><![CDATA[Re: JS: Как запустить txt или word файл из скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=103354#p103354" />
			<content type="html"><![CDATA[<p>Для пробельных случаев экранация WSH.Run(&#039;&quot;&#039;+File+&#039;&quot;&#039;) тоже не помешает. Поправил в 7 варианте.</p>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-05-04T14:47:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=103354#p103354</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: JS: Как запустить txt или word файл из скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=103352#p103352" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>trom пишет:</cite><blockquote><p>у меня просто открылся диск С, а само тхт не открылось</p></blockquote></div><p>Извиняюсь, просмотрел, что косая черта не экранирована:<br /></p><div class="codebox"><pre><code>var put=&quot;C:\test.txt&quot;</code></pre></div><p>В итоге &quot;\t&quot; было воспринято как символ табуляции, т.е. разделитель между параметрами &quot;C:&quot; и &quot;est.txt&quot;.</p>]]></content>
			<author>
				<name><![CDATA[Мальчик-гей]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30832</uri>
			</author>
			<updated>2016-05-04T14:29:46Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=103352#p103352</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: JS: Как запустить txt или word файл из скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=103348#p103348" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>var File = &quot;C:\\test.txt&quot;
var Shell = WScript.CreateObject(&quot;Shell.Application&quot;)
// 1)
Shell.Open(File)
// 2)
Shell.ShellExecute(File)
// 3)
Shell.ControlPanelItem(File)
// 4)
Shell.NameSpace(0).ParseName(File).InvokeVerb(&quot;open&quot;)
// 5)
Shell.NameSpace(0).ParseName(File).InvokeVerb(&quot;edit&quot;)
// 6)
Shell.NameSpace(0).ParseName(File).Verbs().Item(0).DoIt()
// 7)
WScript.CreateObject(&quot;WScript.Shell&quot;). Run(&#039;&quot;&#039;+File+&#039;&quot;&#039;)
// 8)
WScript.CreateObject(&quot;WScript.Shell&quot;).Exec(&quot;notepad &quot; + File)
</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Flasher]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27593</uri>
			</author>
			<updated>2016-05-04T12:12:21Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=103348#p103348</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: JS: Как запустить txt или word файл из скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=103346#p103346" />
			<content type="html"><![CDATA[<p>у меня просто открылся диск С, а само тхт не открылось</p>]]></content>
			<author>
				<name><![CDATA[trom]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33863</uri>
			</author>
			<updated>2016-05-04T11:24:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=103346#p103346</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: JS: Как запустить txt или word файл из скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=103345#p103345" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>shell.Run(put);</code></pre></div><p>, например.</p>]]></content>
			<author>
				<name><![CDATA[Мальчик-гей]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=30832</uri>
			</author>
			<updated>2016-05-04T11:07:26Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=103345#p103345</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[JS: Как запустить txt или word файл из скрипта]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=103339#p103339" />
			<content type="html"><![CDATA[<p>Пробую так вылетает ошибка, exe файлы запускаются без проблем, а как запустить текстовый файл?<br /></p><div class="codebox"><pre><code>var put=&quot;C:\test.txt&quot;
var shell = new ActiveXObject(&quot;WScript.Shell&quot;);
shell.exec(put);</code></pre></div>]]></content>
			<author>
				<name><![CDATA[trom]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=33863</uri>
			</author>
			<updated>2016-05-04T10:24:05Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=103339#p103339</id>
		</entry>
</feed>
