три примера / GIF-PLAY
-1
Code: Select all
;-
filename1=GIF_PLAY1
url1=https://i.imgur.com/S7TXiLf.gif
width := 400 * A_ScreenDPI/96
html=
(
<body style="margin: 0; overflow: hidden">
<img src="%url1%" width="%width%">
</body>
)
Gui, Margin, 0, 0
Gui, Add, picture,x5 y0 w400 h-1 ,C:\test.png
Gui, Add, ActiveX, vDoc x420 y0 w400 h340, HTMLFile
Doc.write(html)
Gui, Show, w840 h340,%filename1%
Return
;---------------------
GuiClose:
ExitApp
;=====================
-2
Code: Select all
;-
filename1=GIF_PLAY1a
;----
url2=https://i.imgur.com/S7TXiLf.gif
f2:=A_ScriptDir . "\tex_avery_02.gif"
ifnotexist,%f2%
urldownloadtofile,%url2%,%f2%
p1:=a_windir . "\Web\Wallpaper\Windows\img0.jpg"
;p1:="C:\test.png"
;-----
width := 400 * A_ScreenDPI/96
html=
(
<body style="margin: 0; overflow: hidden">
<img src="%f2%" width="%width%">
</body>
)
Gui, Margin, 0, 0
Gui, Add, picture,x5 y0 w400 h-1 ,%p1%
Gui, Add, ActiveX, vDoc x420 y0 w400 h340, HTMLFile
Doc.write(html)
Gui, Show, w840 h340,%filename1%
Return
;---------------------
GuiClose:
ExitApp
;=====================
-3
Code: Select all
#warn
#noenv
setworkingdir,%a_scriptdir%
filename1=GIF_PLAY2
Gui,2: -dpiscale
Gui,2:Color,Black,Black
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
;--------------
url1=https://i.imgur.com/Vo6UxTX.gif
;url1=https://i.imgur.com/S7TXiLf.gif
f1:=A_ScriptDir . "\tex_avery_01.gif"
ifnotexist,%f1%
urldownloadtofile,%url1%,%f1%
;-----------------------------
w1:=(wa*27.5)/xx,h1:=(ha*34)/xx
w2:=(wa*23)/xx,h2:=(ha*28)/xx
p1:=(wa*.5)/xx,m1:=(ha*2)/xx
;-----------------------------
xxb=HtmlFile
html=
(Ltrim Join`r`n
<div style="margin:0px;padding:0px;width:%w1%px;height:%h1%px;border:0px solid black;background-color: #000000;">
<img src="%f1%" style="margin:%m1%px;padding:%p1%px;width:%w2%px;height:%h2%px;background-color: #000000">
</div>
)
x:=(wa*1)/xx,y:=(ha*1)/xx,w:=(wa*28)/xx,h:=(ha*35)/xx
Gui,2: Add, ActiveX, x%x% y%y% w%w% h%h% vDoc,%xxb%
Doc.write(html)
x:=(wa*1)/xx,y:=(ha*1)/xx,w:=(wa*32)/xx,h:=(ha*40)/xx
Gui,2: show,x%x% y%y% w%w% h%h%,%filename1%
return
;----------------
2Guiclose:
exitapp
;=============================================