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...
windows media player background issue
-
- Posts: 4
- Joined: 19 Feb 2018, 18:17
windows media player background issue
- Attachments
-
- 1.png (28.17 KiB) Viewed 413 times
-
- slideshow.ahk
- (983 Bytes) Downloaded 14 times
Re: windows media player background issue
maybe is this normal for 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...
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
-
- Posts: 4
- Joined: 19 Feb 2018, 18:17
Re: windows media player background issue
so no one has a fix?
maybe using a different player?
maybe using a different player?
Re: windows media player background issue
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
Who is online
Users browsing this forum: inseption86, jaka1 and 290 guests