<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; AHK: Воспроизведение одного звука из mp4]]></title>
		<link>https://forum.script-coding.com/viewtopic.php?id=14575</link>
		<atom:link href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=14575&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «AHK: Воспроизведение одного звука из mp4».]]></description>
		<lastBuildDate>Wed, 06 Mar 2019 09:54:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132824#p132824</link>
			<description><![CDATA[<p>Не, никакие не тестировал.<br />Но у меня без глюков работает если в таймере прописать:<br /></p><div class="codebox"><pre><code>Wmp.controls.Pause
Wmp.controls.currentPosition := 0
Wmp.controls.Play</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 06 Mar 2019 09:54:40 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132824#p132824</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132823#p132823</link>
			<description><![CDATA[<p>Да уж, работает через одно место. Знаешь какие то плееры с API и.т.п.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Wed, 06 Mar 2019 08:32:06 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132823#p132823</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132822#p132822</link>
			<description><![CDATA[<p>Можно запускать таймер при событии начала воспроизведения, после чего подписку на событие прекращать.<br />А таймер уже будет запускать &quot;Wmp.controls.currentPosition := 0&quot;.<br />Тебе же непрерывный цикл нужен, так что файл будет открываться только первый раз.<br /></p><div class="quotebox"><cite>serzh82saratov пишет:</cite><blockquote><p>То что в 28 последний кадр остаётся, это по твоему баг.</p></blockquote></div><p>По-моему WMP - это один большой баг. <img src="//forum.script-coding.com/img/smilies/smile.png" width="15" height="15" /></p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Wed, 06 Mar 2019 02:56:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132822#p132822</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132821#p132821</link>
			<description><![CDATA[<p>Таймер исходя из продолжительности?<br />На коротких роликах не айс, и при открытии файла, даже картинки, WMP очень прожорлив, будут просадки. <br />Также при открытии почему то начинают перерисовываться некоторые другие окна, например блокнот++, думаю это тоже часть большой нагрузки. В других плеерах такого не наблюдал.<br />То что в 28 последний кадр остаётся, это по твоему баг.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Wed, 06 Mar 2019 02:19:35 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132821#p132821</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132819#p132819</link>
			<description><![CDATA[<p>Через settimer?</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 05 Mar 2019 19:31:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132819#p132819</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132818#p132818</link>
			<description><![CDATA[<p>Так в конце не исчезает:<br /></p><div class="codebox"><pre><code>#SingleInstance Force
#NoEnv

File = w2v.mp4 

OnExit Wmpclose 
Global hWmp 

Gui, Margin, 0,0  
Gui +LastFound  +AlwaysOnTop -Caption
Gui Add, ActiveX, w111 h111 vWmp hwndhWmp, WmpLayer.OCX

ComObjConnect(Wmp, WmpEvents)

Wmp.uiMode := &quot;none&quot; 

Wmp.Url := File
Gui, Show, NA x0 y0
return   

Class WmpEvents 
{ 
	StatusChange(Wmp) { 
		If Wmp.PlayState = 3  ;	Playing
		{ 
			Height := Wmp.currentMedia.imageSourceHeight  
			Width := Wmp.currentMedia.imageSourceWidth
			winmove, ahk_id %hWmp%, , 0, 0, Width, Height 
			Gui, Show, NA w%Width% h%Height%
		}
	}    
}

esc::
Wmpclose:  
	Wmp.close
	ExitApp</code></pre></div><p>Но если изменить размер, то исчезает.<br /></p><div class="codebox"><pre><code>winmove, ahk_id %hWmp%, , 0, 0, Width, Height-1</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 05 Mar 2019 17:05:48 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132818#p132818</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132817#p132817</link>
			<description><![CDATA[<p>Непрерывно следить когда текущая позиция совпадёт с концом, что то не очень.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 05 Mar 2019 16:42:21 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132817#p132817</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132816#p132816</link>
			<description><![CDATA[<p>Отслеживай конец и перематывай сам на начало.</p>]]></description>
			<author><![CDATA[null@example.com (Malcev)]]></author>
			<pubDate>Tue, 05 Mar 2019 16:28:19 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132816#p132816</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132813#p132813</link>
			<description><![CDATA[<p>Точнее в момент окончания воспроизведения последний кадр пропадает (так же как и при однократном воспроизведении), то есть становится черная картинка. <br />Причём такого нет, если ActiveX в точности соответствует размерам видео, то есть по окончании воспроизведения остаётся последний кадр.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 05 Mar 2019 15:46:53 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132813#p132813</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132806#p132806</link>
			<description><![CDATA[<div class="quotebox"><cite>teadrinker пишет:</cite><blockquote><p>Добавьте строчку<br /></p><div class="codebox"><pre><code>Player.Settings.SetMode(&quot;loop&quot;, true)</code></pre></div></blockquote></div><p>Странный эффект, в WMP из под винды или в большинстве других плееров в момент повторного проигрывания нет мелькания как в ActiveX.</p>]]></description>
			<author><![CDATA[null@example.com (serzh82saratov)]]></author>
			<pubDate>Tue, 05 Mar 2019 13:34:26 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132806#p132806</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132343#p132343</link>
			<description><![CDATA[<p>А GUI зачем?</p>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Fri, 22 Feb 2019 15:36:12 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132343#p132343</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132340#p132340</link>
			<description><![CDATA[<div class="codebox"><pre><code>
Gui, Add, ActiveX, vMP, WMPlayer.OCX
MP.url := file ; путь к файлу
gui, show, hide
WP.Play
</code></pre></div><p>Остановка:<br /></p><div class="codebox"><pre><code>gui, destroy</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (felrok)]]></author>
			<pubDate>Fri, 22 Feb 2019 14:43:00 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132340#p132340</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132215#p132215</link>
			<description><![CDATA[<p>teadrinker,&nbsp; вот сейчас все заработало.<br />Большое спасибо вам.</p>]]></description>
			<author><![CDATA[null@example.com (димитрий2)]]></author>
			<pubDate>Sat, 16 Feb 2019 10:53:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132215#p132215</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132214#p132214</link>
			<description><![CDATA[<p>Попробуйте так:<br /></p><div class="codebox"><pre><code>WM_COMMAND := 0x111, ID_FILE_PAUSE := 65403, ID_FILE_CLOSE = 65405
scriptName := &quot;1.ahk ahk_class AutoHotkey&quot;
DetectHiddenWindows, On
SetTitleMatchMode 2

if !WinExist(scriptName) {
   MsgBox, Окно не найдено!
   Return
}
PostMessage, WM_COMMAND, ID_FILE_PAUSE
Sleep, 100
PostMessage, WM_COMMAND, ID_FILE_CLOSE</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (teadrinker)]]></author>
			<pubDate>Sat, 16 Feb 2019 10:50:11 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132214#p132214</guid>
		</item>
		<item>
			<title><![CDATA[Re: AHK: Воспроизведение одного звука из mp4]]></title>
			<link>https://forum.script-coding.com/viewtopic.php?pid=132213#p132213</link>
			<description><![CDATA[<p>teadrinker, теперь появилось окно &quot;Закрывающий скрипт запущен&quot;.<br />Затем пишет &quot;Окно 1.ahk обнаружено&quot;.<br />Затем пишет &quot;0&quot;.<br />Затем опять пишет &quot;0&quot; - и звук перестает проигрываться и файл 1.ahk закрывается.</p><p>А как это все - без лишних окон сделать ?<br />Просто закрыть и все.</p>]]></description>
			<author><![CDATA[null@example.com (димитрий2)]]></author>
			<pubDate>Sat, 16 Feb 2019 10:44:23 +0000</pubDate>
			<guid>https://forum.script-coding.com/viewtopic.php?pid=132213#p132213</guid>
		</item>
	</channel>
</rss>
