Youtube_Play ActiveX

Esta sección es para compartir scripts, librerías y herramientas.

Moderator: Flipeador

garry
Posts: 3758
Joined: 22 Dec 2013, 12:50

Youtube_Play ActiveX

31 Dec 2018, 15:22

EDIT-2 = 20200818 con VLC.exe
-------------------------------------------------------------

Code: Select all

;- Youtube_Play ActiveX with VLC.exe
;- https://www.autohotkey.com/boards/viewtopic.php?f=70&t=60536
;- modified = 20200818
;- created  = 20181231
;- ActiveX example for YOUTUBE
;- Play Youtube-Video ( if allowed to embed )
;- https://www.autohotkey.com/boards/viewtopic.php?f=6&t=74482   ;- play youtube
;- https://www.autohotkey.com/boards/viewtopic.php?f=6&t=74484   ;- play video with vlc.exe
;------------------------------------------------------
setworkingdir,%a_scriptdir%
Filename1=Youtube-Play    ;- only videos allowed for embed
Gui,2:default
Gui,2:-border
GUI,2:Font,s14 cGray,Lucida Console
Gui,2: -DPIScale
Gui,2: Color, Black,Black 
id1=sraZaL6jylM;Lilian de Celis-El Relicario
stringsplit,c,id1,`;
url=https://www.youtube.com/embed/%c1%?autoplay=1
fp:="https://i.imgur.com/QiLP9qz.jpg"
pict=%a_scriptdir%\relicario_text.jpg
ifnotexist,%pict%
  urldownloadtofile,%fp%,%pict%
wa:=A_screenwidth,ha:=A_screenHeight,xx:=101
LW:=(wa*88)/xx,LH:=(ha*88)/xx,wm:=(wa*88.7)/xx,hm:=(ha*90)/xx,GW:=(wa*99.5)/xx,GH:=(ha*96)/xx  
x1:=(wa*1.5)/xx,y1:=(ha*2)/xx,x2:=(wa*1.2)/xx,y2:=(ha*1)/xx
;----------------
xxb=VideoLAN.VLCPlugin.2
;-- picture -----
xp:=(wa*90.3)/xx,yp:=(ha* 1.8)/xx,wp:=(wa* 8.4)/xx,hp:=(ha*88.9)/xx
;----------------
Gui,2:Add,ActiveX, x%x1% y%y1% w%lw%  h%lh% vVLCX,%xxb%
Gui,2:Add,Picture, x%xp% y%yp% w%wp%  h%hp% ,%pict%
Gui,2:add,GroupBox,x%x2% y%y2% w%WM% h%HM%
x:=(wa*30)/xx,y:=(ha*92)/xx,w:=(wa*5)/xx,h:=(ha*2.5)/xx  
Gui,2:Add,Edit,x%x2% y%y% vURL, %url%
Gui,2:Show,x0 y0 w%gw% h%gh%,%filename1%
VLCx.playlist.add(URL)
VLCx.playlist.play()
return
;----------------
2Guiescape:
2Guiclose:
exitapp
esc::exitapp
;======================= END SCRIPT YOUTUBE PLAY with VLC.exe =========

EDIT modified = 20200425
aquí otro ejemplo

Code: Select all

;-------- saved at Samstag, 25. April 2020 20:53:13 --------------
;- Youtube_Play ActiveX 
;- https://www.autohotkey.com/boards/viewtopic.php?f=70&t=60536

;- modified = 20200425
;- created  = 20181231
;- ActiveX example for YOUTUBE
;- Play Youtube-Video ( if allowed to embed )
;- https://www.autohotkey.com/boards/viewtopic.php?f=6&t=74482   ;- play youtube
;- https://www.autohotkey.com/boards/viewtopic.php?f=6&t=74484   ;- play video with vlc.exe
;------------------------------------------------------
setworkingdir,%a_scriptdir%
Filename1=Youtube-Play    ;- only videos allowed for embed
Gui,2:default
Gui,2:-border
GUI,2:Font,s14 cGray,Lucida Console
Gui,2: -DPIScale
Gui,2: Color, Black,Black 
id1=sraZaL6jylM;Lilian de Celis-El Relicario
stringsplit,c,id1,`;
url=https://www.youtube.com/embed/%c1%?autoplay=1
fp:="https://i.imgur.com/QiLP9qz.jpg"
pict=%a_scriptdir%\relicario_text.jpg
ifnotexist,%pict%
  urldownloadtofile,%fp%,%pict%
wa:=A_screenwidth
ha:=A_screenHeight
xx:=101
LW:=(wa*88)/xx,LH:=(ha*88)/xx,wm:=(wa*88.7)/xx,hm:=(ha*90)/xx,GW:=(wa*99.5)/xx,GH:=(ha*96)/xx  
x1:=(wa*1.5)/xx,y1:=(ha*2)/xx,x2:=(wa*1.2)/xx,y2:=(ha*1)/xx
;----------------
xxb=Shell.Explorer     ;- IExplorer
;xxb=Mozilla.Browser    ;- Mozilla Firefox
;-- picture -----
xp:=(wa*90.3)/xx,yp:=(ha* 1.8)/xx,wp:=(wa* 8.4)/xx,hp:=(ha*88.9)/xx
;----------------
Gui,2:Add,ActiveX, x%x1% y%y1% w%lw%  h%lh% vWB,%xxb%
;wb.Visible := true 
WB.Silent  := True
WB.Navigate(URL)
Gui,2:Add,Picture, x%xp% y%yp% w%wp%  h%hp% ,%pict%
Gui,2:add,GroupBox,x%x2% y%y2% w%WM% h%HM%
x:=(wa*30)/xx,y:=(ha*92)/xx,w:=(wa*5)/xx,h:=(ha*2.5)/xx  
;Gui,2:add,button,x%x% y%y% w%w% h%h%,GO
Gui,2:Add,Edit,x%x2% y%y% vURL, %url%
Gui,2:Show,x0 y0 w%gw% h%gh%,%filename1%
return
;----------------
2Guiescape:
2Guiclose:
WB.Document.close
WB := ""
exitapp
esc::exitapp
;======================= END SCRIPT YOUTUBE PLAY / BROWSER =========

Last edited by garry on 18 Aug 2020, 15:25, edited 4 times in total.
garry
Posts: 3758
Joined: 22 Dec 2013, 12:50

Re: Youtube_Play ActiveX videolan

11 Apr 2020, 00:53

EDIT 20200818 = con vlc.exe funciona

also
;- https://www.autohotkey.com/boards/viewtopic.php?f=6&t=74482 ;- play youtube
;- https://www.autohotkey.com/boards/viewtopic.php?f=6&t=74484 ;- play video with vlc.exe

Return to “Scripts y Funciones”

Who is online

Users browsing this forum: No registered users and 9 guests