Code: Select all
;- modified = 20200826
;- created = 20200426
;-- example PARENT_CHILD , use ESC to close GUI-2/3 or remove caption or add Close-button
;- VideoPlay with vlc.exe
#warn
#noenv
Gui,1:default
Gui,1: -DPIScale
SS_REALSIZECONTROL := 0x40
wa:=A_screenwidth,ha:=A_screenHeight,xx=100
Gui,1: +HwndAId +0x2000000 ;- < A
;---------------
Gui,1:Font,s10 cBlack,Lucida Console
;Gui,1:Color,C8D0D4,Black ;- gray
Gui,1:Color,Black,Black
;---------------
x:=(wa*1)/xx,y:=(ha*1)/xx,w:=(wa*4)/xx,h:=(ha*2.3)/xx
Gui,1: add, Button ,x%x% y%y% w%w% h%h% gChilddestroyall vA1,1-MAIN
y:=(ha*4)/xx
Gui,1: Add, Button ,x%x% y%y% w%w% h%h% gAdd2 vA2, 2-Video
y:=(ha*7)/xx
Gui,1: Add, Button ,x%x% y%y% w%w% h%h% gAdd3 vA3, 3-Picture
;---------------
x:=(wa*6)/xx,y:=(ha*.1)/xx,w:=(wa*58)/xx,h:=(ha*54)/xx
Gui,1:Add,picture, x%x% y%y% w%w% h%h% ,C:\windows\web\wallpaper\windows\img0.jpg
;---------------
x:=(wa*8)/xx,y:=(ha*1)/xx,w:=(wa*6)/xx,h:=(ha*2.3)/xx
Gui,1: Add, Button, x%x% y%y% w%w% h%h% gS1, Some -1
y:=(ha*4)/xx
Gui,1: Add, Button, x%x% y%y% w%w% h%h% gO1, Other-1
;----------------
x:=(wa*1)/xx,y:=(ha*1)/xx,w:=(wa*66)/xx,h:=(ha*56)/xx
Gui,1: Show,x%x% y%y% w%w% h%h%,PARENT_CHILD ( use ESC to close GUI-2/3 )
Guicontrol,1:disable ,A1
return
;------------------
GuiClose:
ExitApp
;------------------
S1:
msgbox,SOME-1
return
O1:
msgbox,OTHER-1
return
;======================================================
;------------------------------------------------------
childdestroyall:
Gui,2:destroy
Gui,3:destroy
Guicontrol,1:disable,A1
Guicontrol,1:enable ,A2
Guicontrol,1:enable ,A3
return
;------------------------------------------------------
;============= 2nd VIDEOPLAY vlc.exe ==================
Add2:
Gui,1:submit,nohide
Gui,2: default
Gui,2: -DPIScale +HwndBId -Caption -Border +alwaysontop ;- < B
SS_REALSIZECONTROL := 0x40
Gui,2: Color,Black,Black
HK2=Esc
Hotkey,%hk2%,Remove2,ON
;----------
url=https://www.youtube.com/embed/sraZaL6jylM?autoplay=1
;xxb=Shell.Explorer ;- IExplorer
xxb=VideoLAN.VLCPlugin.2
x:=(wa*.1)/xx,y:=(ha*.1)/xx,w:=(wa*58)/xx,h:=(ha*54)/xx
Gui,2:Add,ActiveX, x%x% y%y% w%w% h%h% vVlcx,%xxb%
;Gui,2:Add,ActiveX, x%x% y%y% w%w% h%h% vWB,%xxb%
;wb.Visible := true
;WB.Silent := True
;WB.Navigate(URL)
VLCx.playlist.add(URL)
VLCx.playlist.play()
;----------
x:=(wa*6)/xx,y:=(ha*.1)/xx,w:=(wa*59)/xx,h:=(ha*55)/xx
Gui,2: Show, x%x% y%y% w%w% h%h%
;----------
Gui,2:+Parent%AId% ;- <<<<<<<< PARENT
Gui,3:destroy ;- <<<<<<<< DESTROY
Guicontrol,1:disable,A2
Guicontrol,1:enable,A1
Guicontrol,1:enable,A3
return
;--------------------------------
Remove2:
vlcx.playlist.items.clear()
vlcx.playlist.stop()
Guicontrol,1:disable,A1
Guicontrol,1:enable ,A2
Guicontrol,1:enable ,A3
Gui,2:destroy
Gui,1:default
return
;======================================================
;============ 3th =====================================
Add3:
Gui,1:submit,nohide
Gui,3: default
;Gui,3: -DPIScale -Caption +Parent2 alwaysontop
Gui,3: -DPIScale +HwndCId -Caption -Border +alwaysontop ;-- < C
;---------
SS_REALSIZECONTROL := 0x40
Gui,3: Color,Black,Black
HK3=Esc
Hotkey,%hk3%,Remove3,ON
;---------
x:=(wa*0.1)/xx,y:=(ha*.1)/xx,w:=(wa*58)/xx,h:=(ha*54)/xx
;Gui,3:Add,picture, x%x% y%y% w%w% h%h% ,C:\windows\web\wallpaper\windows\img0.jpg
Gui,3:Add,picture, x%x% y%y% w%w% h%h% ,C:\windows\web\screen\img100.jpg
;---------
x:=(wa*1)/xx,y:=(ha*1)/xx,w:=(wa*6)/xx,h:=(ha*2.3)/xx
Gui,3: Add, Button, x%x% y%y% w%w% h%h% gS3, Some -3
y:=(ha*4)/xx
Gui,3: Add, Button, x%x% y%y% w%w% h%h% gO3, Other-3
;----------
x:=(wa*6)/xx,y:=(ha*.1)/xx,w:=(wa*58)/xx,h:=(ha*56)/xx
Gui,3: Show, x%x% y%y% w%w% h%h%
;----------
Gui,3:+Parent%AId% ;- <<<<<<<<< PARENT
Gui,2:destroy ;- <<<<<<<<< destroy
Guicontrol,1:enable,A1
Guicontrol,1:enable,A2
Guicontrol,1:disable,A3
return
;-------------------------------------
Remove3:
Guicontrol,1:disable,A1
Guicontrol,1:enable ,A2
Guicontrol,1:enable ,A3
Gui,3:destroy
Gui,1:default
return
;-------------------------------------
S3:
msgbox,SOME-3
return
O3:
msgbox,OTHER-3
return
;================== END SCRIPT ====================================