<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; HTA: слайд-шоу с музыкальным сопровождением]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=3021</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=3021&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «HTA: слайд-шоу с музыкальным сопровождением».]]></description>
		<lastBuildDate>Wed, 08 Apr 2009 18:43:58 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[HTA: слайд-шоу с музыкальным сопровождением]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=21508#p21508</link>
			<description><![CDATA[<p>Запускать из папки с рисунками. Если в папку закинуть mp3-файл, он будет проигрываться во время слайд-шоу. Желательно, чтобы размер рисунков соответствовал текущему разрешению экрана. Рисунки будут бесконечно чередоваться в случайном порядке.<br /></p><div class="codebox"><pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Слайдшоу&lt;/title&gt;
&lt;hta:application applicationname=shideshow version=1.0
    caption=no sysmenu=no scroll=no scrollflat=no
    innerborder=no border=thin borderStyle=normal
    singleinstance=yes showintaskbar=yes
    minimizebutton=yes maximizebutton=no windowstate=maximize
    selection=no contextmenu=yes navigable=no&gt;
&lt;meta http-equiv=msthemecompatible content=yes&gt;
&lt;style&gt;
    body{margin:0px;cursor:crosshair;}
    #image{width:100%;height:100%;filter:revealTrans(duration=1.5,transition=23)}
&lt;/style&gt;
&lt;script&gt;
fso=new ActiveXObject(&#039;Scripting.fileSystemObject&#039;);
allfiles=new Enumerator(fso.getFolder(&#039;.&#039;).files);
imagefiles=new Array();
musicfiles=new Array();
window.document.onkeydown=stop;
window.onload=init;
function init() {
 countFiles();
 if(musicfiles.length)
 music.src=musicfiles[Math.ceil(Math.random()*musicfiles.length)-1];
 start();
}
function stop() {if(event.keyCode==27)window.close();else alert(&#039;Для выхода нажмите ESC    &#039;);}
function start() {
 image.filters.revealTrans.transition=Math.ceil(Math.random()*24)-1;
 image.filters.revealTrans.Apply();
 image.src=imagefiles[Math.ceil(Math.random()*imagefiles.length)-1];
 image.filters.revealTrans.Play();
 setTimeout(&quot;start()&quot;,3000);
}
function countFiles() {
 while(!allfiles.atEnd()) {
  file=allfiles.item();
  switch(fso.getExtensionName(file.path).toLowerCase()){
   case&#039;jpeg&#039;:case&#039;jpg&#039;:case&#039;png&#039;:case&#039;gif&#039;:case&#039;bmp&#039;:imagefiles[imagefiles.length]=file.name;break;
   case&#039;mp3&#039;:case&#039;wav&#039;:case&#039;wave&#039;:musicfiles[musicfiles.length]=file.name;break;
  }
  allfiles.moveNext();
 }
 if(!imagefiles.length){alert(&#039;\nВ текущей директории риунки не найдены!\n\nЗапустите программу из папки с рисунками.  \n\nПоддерживаемые форматы: JPG, BMP, GIF и PNG.\n\n&#039;);close();}
}
&lt;/script&gt;
&lt;bgsound id=music loop=-1&gt;
&lt;/head&gt;
&lt;body&gt;&lt;img id=image&gt;&lt;br&gt;&lt;/body&gt;
&lt;/html&gt;</code></pre></div><p>Автор решения — <strong>medium</strong>.</p>]]></description>
			<author><![CDATA[null@example.com (The gray Cardinal)]]></author>
			<pubDate>Wed, 08 Apr 2009 18:43:58 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=21508#p21508</guid>
		</item>
	</channel>
</rss>
