hier nur ein Beispiel , zeigt Bilder von einem Ordner , z.B. für 3 Sekunden oder benütze SPACE-Taste
Code: Select all
;-----------------------------------
#warn
setworkingdir,%a_scriptdir%
SetBatchLines, -1
;------ your variables -------------
mf=D:\m_media\m_foto ;- <<<< your PATH here
extensions :="jpg,bmp,png"
seconds := 3
;-----------------------------------
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
e:=""
seconds:=(seconds*1000)
x:=(wa*16)/xx , y:=(ha*.1)/xx , w:=(wa*67)/xx, h:=(ha*95)/xx
Gui,2:default
Gui,2: +HwndAId +0x2000000
Gui,2: -DPIScale
Gui,2: +AlwaysOnTop -Caption
Gui,2: Margin, 0, 0
Gui,2:Color,Black,Black
loop,%mf%\*.*,0,1
{
SplitPath,a_loopfilefullpath, name, dir, ext, name_no_ext, drive
if ext in %extensions%
e .= a_loopfilefullpath . "`r`n"
}
gui,2: show ,x%x% y%y% w%w%,Test1
if e=
{
msgbox, 262208,FILES ,No pictures found`nDefine your pictures-folder in this script
exitapp
}
Loop,parse,e,`n,`r
{
xc:=a_loopfield
if xc=
continue
gosub,childnew1
}
return
;---------------------
esc::
2Guiclose:
Gui,3:destroy
sleep,1000
exitapp
;---------------------
childnew1:
Gui,2:submit,nohide
Gui,3:default
imgSize(x,imgw,imgh)
Gui,3: -DPIScale
Gui,3: +AlwaysOnTop -Caption
Gui,3: Margin, 0, 0
Gui,3: +HwndBId -Caption -Border
Gui,3: Color,Black,Black
if (imgw>imgh)
gui,3:add, Picture, x0 y0 h-1 w%w%,%xc%
else
gui,3:add, Picture, x0 y0 h%h% w-1 ,%xc%
Gui,3:Show,x0 y0 ,Test2
WinGetPos,,,Width2,Height2,Test2
Gui,3:+Parent%AId%
Winmove,,Test2,,,,%height2%
sleep,%seconds%
;keywait,space,D ;- <<< instead sleep seconds use SPACE-key to continue
Gui,3:destroy
return
;------------------------------------
imgSize(img, ByRef width , ByRef height) { ; Get image's dimensions
If FileExist(img) {
GUI, Add, Picture, hwndpic, %img%
ControlGetPos,,, width, height,, ahk_id %pic%
Gui, Destroy
} Else height := width := 0
}
;=============== END SCRIPT Foto Slide-Show ============