windows media player background issue

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Eyal22cohen
Posts: 4
Joined: 19 Feb 2018, 18:17

windows media player background issue

20 Feb 2018, 10:28

so that's my fist post for help ever, i've been coding forever and have been playing with ahk for a while...
here's the deal... i have created a dynamic slideshow, that loads jpgs and mp4s from a folder randomly, and uses wmp activex to play the video.
the only problem is the annoying black background of WMP, it takes about half a sec or less to load the video and the black background placeholder just ruins the whole thing...
i've tried backgroundtrans and other setting and nothing... i would settle for a white background if possible.
please save me from this loop...
Attachments
1.png
1.png (28.17 KiB) Viewed 413 times
slideshow.ahk
(983 Bytes) Downloaded 14 times
garry
Posts: 3770
Joined: 22 Dec 2013, 12:50

Re: windows media player background issue

21 Feb 2018, 15:46

.. the only problem is the annoying black background of WMP, it takes about half a sec or less to load the video and the black background placeholder just ruins the whole thing...
maybe is this normal for video (?)

Code: Select all

;https://autohotkey.com/boards/viewtopic.php?f=5&t=44513
;- MP4 not works for me /  JPG , AVI , GIF  is OK

#warn
#NoEnv
#SingleInstance force
SetTitleMatchMode 2
SetBatchLines -1

Gui,1:default
Gui, -resize
gui, -Border
Gui, -SysMenu

ext1:="jpg"
ext2:="avi,mp4,gif"

Gui, Add, ActiveX, x10 y10 w600 h500 vWMP, WMPLayer.OCX
Gui, Add, Picture, BackGroundTrans x10 y10 w580 h480 vpng1

Filelist               :=""
WMP.uiMode             := "none"            ;- no WMP controls
WMP.stretchToFit       := 1                 ;- video is streched to the given activex range
WMP.enableContextMenu  := 0                 ;- no reaction to right click in the video field
WMP.Settings.AutoStart := True
WMP.settings.setMode("loop", true)

gui, color, black
Gui, Show, x0 y0 w620 h515, slideshow
GuiControl, +BackgroundTrans, WMP
loop, files, %a_desktop%\test\*.*
	FileList = %FileList%%A_LoopFileFullPath%`n
Sort, FileList, Random

again:
Loop, parse, FileList, `n
{
SplitPath,A_LoopField, name, dir, ext, name_no_ext, drive
if ext=
 break
else
  {
  if ext in %ext1%
	{
	WMP.Close()
	GuiControl,, png1, %A_LoopField%
	Sleep 3000
	}
  else if ext in %ext2%
	{
	WMP.Url := A_LoopField
        Sleep 5000
	}
  }
}
goto,again
;msgbox,END
return

GuiClose:
ExitApp
esc::exitapp
Eyal22cohen
Posts: 4
Joined: 19 Feb 2018, 18:17

Re: windows media player background issue

25 Feb 2018, 03:50

so no one has a fix?
maybe using a different player?
garry
Posts: 3770
Joined: 22 Dec 2013, 12:50

Re: windows media player background issue

25 Feb 2018, 11:39

just an example with irfanview

Code: Select all

;https://www.heise.de/download/product/irfanview-1965/download
#warn
#NoEnv
#SingleInstance force

f1 = %a_programfiles%\IrfanView\i_view32.exe
;f1 = C:\M_SmallPrograms\irfanview\i_view32.exe
f2 = %a_scriptdir%\IrfanViewRandomFotos.txt
;---------------------------------------------
filelist:=""
loop, files,C:\M_FOTO\*.*,R
        FileList .= A_LoopFileFullPath . "`r`n"
Sort, FileList, Random
ifexist,%f2%
   filedelete,%f2%
fileappend,%filelist%,%f2%
;runwait,"%f1%"                ;- for settings
runwait,"%f1%" /slideshow=%f2% /closeslideshow
exitapp

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: inseption86, jaka1 and 290 guests