<?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=6080&amp;type=atom" />
	<updated>2011-08-03T17:31:40Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=6080</id>
		<entry>
			<title type="html"><![CDATA[Re: VBScript Проблема с открытием ссылки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50349#p50349" />
			<content type="html"><![CDATA[<p>Всем спасибо за участие! Может кому-нибудь пригодится, проблема была решена следующим образом:<br /></p><div class="codebox"><pre><code>Set WshShell = CreateObject(&quot;WScript.Shell&quot;)
WshShell.Exec(&quot;%programfiles%\Opera\Opera.exe&quot;)
WScript.Sleep (1000)
WshShell.SendKeys WshShell.CurrentDirectory&amp;&quot;/Exploration1/theme/cheetah.html?c1lang=en&amp;c1id=en0600000000&amp;c2lang=&amp;c2id=&amp;chapter=1&quot;
WshShell.SendKeys &quot;~&quot;</code></pre></div>]]></content>
			<author>
				<name><![CDATA[vitali_master]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27122</uri>
			</author>
			<updated>2011-08-03T17:31:40Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50349#p50349</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript Проблема с открытием ссылки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50348#p50348" />
			<content type="html"><![CDATA[<p><strong> smaharbA</strong>, пишет не удается найти... Проверьте провильность пути или адреса в Интернете.</p>]]></content>
			<author>
				<name><![CDATA[vitali_master]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27122</uri>
			</author>
			<updated>2011-08-03T16:26:58Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50348#p50348</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript Проблема с открытием ссылки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50347#p50347" />
			<content type="html"><![CDATA[<div class="codebox"><pre><code>echo off
set &quot;url=file:///%~d0/Exploration1/theme/cheetah.html?c1lang=en&amp;c1id=en0600000000&amp;c2lang=&amp;c2id=&amp;chapter=1&quot;
for /f &quot;tokens=2 delims==&quot; %%i in (&#039;ftype htmlfile&#039;) do (
    start &quot;&quot; %%i &quot;%url%&quot;
    exit /b
    )</code></pre></div>]]></content>
			<author>
				<name><![CDATA[smaharbA]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=2911</uri>
			</author>
			<updated>2011-08-03T15:40:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50347#p50347</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript Проблема с открытием ссылки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50346#p50346" />
			<content type="html"><![CDATA[<p>Opera</p>]]></content>
			<author>
				<name><![CDATA[vitali_master]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27122</uri>
			</author>
			<updated>2011-08-03T13:16:37Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50346#p50346</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: VBScript Проблема с открытием ссылки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50345#p50345" />
			<content type="html"><![CDATA[<p><strong>vitali_master</strong>, браузер — IE?</p>]]></content>
			<author>
				<name><![CDATA[alexii]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=1844</uri>
			</author>
			<updated>2011-08-03T12:51:11Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50345#p50345</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[VBScript Проблема с открытием ссылки]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=50344#p50344" />
			<content type="html"><![CDATA[<p>Добрый день! Вот такая проблема. На флешке имеется папка с учебными материалами. Чтобы открыть первую страницу использую ссылку <em> file:///<span style="color: red">C:/CISCO_CCNA</span>/Exploration1/theme/cheetah.html?c1lang=en&amp;c1id=en0600000000&amp;c2lang=&amp;c2id=&amp;chapter=1 </em><br />При переходе на другой компьютер путь меняется и его приходится каждый раз править руками. Неудобно. Решил сделать простенький скриптик. Идея была такая. Скрипт лежит в папке CISCO_CCNA. При запуске определяется текущий путь к скрипту и дописывается в вышеприведенную ссылку вместо выделенного красным. Далее открывается браузер, ему указывается сформированный путь и вуаля. Вот что у меня получилось:<br /></p><div class="codebox"><pre><code> Set WshShell = CreateObject(&quot;WScript.Shell&quot;)
pth2 =&quot;file://localhost/&quot;&amp;WshShell.CurrentDirectory&amp;&quot;/Exploration1/theme/cheetah.html?c1lang=en&amp;c1id=en0600000000&amp;c2lang=&amp;c2id=&amp;chapter=1&quot;
WshShell.Run pth2</code></pre></div><p>И вот тут начинаются проблемы. Браузер открывает вкладку, где в адресной строке<br /> написано <span style="color: red">file://localhost/G:/CISCO_CCNA/Exploration1/theme/cheetah.html</span>, <br />т.е. параметры <span style="color: green"> ?c1lang=en&amp;c1id=en0600000000&amp;c2lang=&amp;c2id=&amp;chapter=1 </span> в адресную строку не передаются, а без них страница загружается не правильно.<br />Подскажите люди добрые в чем причина или где ошибка моя?</p>]]></content>
			<author>
				<name><![CDATA[vitali_master]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=27122</uri>
			</author>
			<updated>2011-08-03T10:47:00Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=50344#p50344</id>
		</entry>
</feed>
