Code: Select all
;- Internetbrowser play also Youtube-Video / with DropDownList
;- Modified=20200408
;- Created =20200217
#warn
#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode 2
SetBatchLines, -1
CoordMode, Mouse , Relative ;- GUI
DetectHiddenWindows, On
filename1=InternetBrowser
Gui,3:default
Gui,3: -DPIScale
SS_REALSIZECONTROL := 0x40
Gui,3:color,black,black
wa:=A_screenwidth,ha:=A_screenHeight,xx:=100
;- maybe change fontsize
;============ GUISIZEx DPIx 4Kx 3840*2160 is 100% ============
if (wa=3840)
Gui,3:Font,s14 cYellow,Lucida Console
;============ GUISIZEx DPIx FHD 1920*1080 is 100% ============
if (wa=1920)
Gui,3:Font,s10 cYellow,Lucida Console
;=============================================================
xxa=Shell.Explorer ;- IExplorer
;xxa=Mozilla.Browser ;- Mozilla Firefox
transform,s,chr,32
url:=""
h2:=""
global url,h2
;------------
;xxvd=https://www.youtube.com
xxvd=https://invidio.us
e5x=
(Ltrim comments join|
Lilian de Celis -ElRelicario YT ,https://www.youtube.com/embed/eKZhI2r9J8U?autoplay=1
Lilian de Celis -A hierro muere YT ,https://www.youtube.com/embed/2SZvhUVXlE4?autoplay=1
Gloria Lasso Etranger au paradies ,%xxvd%/watch?v=l9lw-zQcZ58&autoplay=1
Li xiang lan -Ye lai xiang ,%xxvd%/watch?v=iR0w0mWB3uA&autoplay=1
Grace Chang Ge Lan - Calypso ,%xxvd%/watch?v=ZIfpCLrjXVU&autoplay=1
Leonore Veenemans-Kom terug ,%xxvd%/watch?v=mgcxgK1uXj8&autoplay=1
Vera Ellen - Three little words 1950 ,%xxvd%/watch?v=pd6suTj5wQ0&autoplay=1
Jim Reeves - I love you because ,%xxvd%/watch?v=qit_HikDGxU&autoplay=1
Julie Andrews-I could have danced all night ,%xxvd%/watch?v=av_79tvxTFA&autoplay=1
Sumi Yo - La Paloma ,%xxvd%/watch?v=ulS3pklaoz4&autoplay=1
Shin Yeon Ah-La Paloma ,%xxvd%/watch?v=OCeSmYAn_9E&autoplay=1
%s%
)
;--------
x:=(wa*.2)/xx,y:=(ha*.1)/xx,h:=(ha*2.4)/xx,w:=(wa*35)/xx
Gui,3: Add, Edit, x%x% y%y% w%w% h%h% vURL,
x:=(wa*35.7)/xx,w:=(wa*1.5)/xx
Gui,3: Add, Button,x%x% y%y% w%w% h%h% gBrB, <
x:=(wa*38)/xx,
Gui,3: Add, Button,x%x% y%y% w%w% h%h% gBrF, >
x:=(wa*40)/xx,
Gui,3: Add, Button,x%x% y%y% w%w% h%h% Default gA1, Go
x:=(wa*44)/xx,h:=(ha*25)/xx,w:=(wa*20)/xx
Gui,3:Add,DDL,x%x% y%y% w%w% h%h% cBlack vUrlDDL gAA,%e5x%
x:=(wa*.2)/xx,y:=(ha*3)/xx,h:=(ha*60)/xx,w:=(wa*65)/xx
Gui,3: Add, ActiveX, w%w% h%h% x%x% y%y% vWB,%xxa%
;--------
WB.Silent := True
ComObjConnect(WB, WB_events) ;- Connect WB's events to the WB_events class object.
;--------
x:=(wa*.2)/xx,y:=(ha*.2)/xx,h:=(ha*70)/xx,w:=(wa*67)/xx
Gui,3:show,x%x% y%y% w%w% h%h%,%filename1%
;--------
GuiControl,3: ChooseString,urlddl,Grace
gosub,aa
return
;----------------------------------------------------
;-----------------------------------------------------
3Guiescape:
3GuiClose:
WB.Document.close
WB := ""
exitapp
;-----------------------------------------------------
aa:
Gui,3: submit, nohide
h1:=""
h2:=""
if urlDDL<>
{
StringSplit,h,urlddl, `,
Guicontrol,3:,url,%h2%
WB.Navigate(h2)
}
return
;----------------------------------------------------------------
a1:
Gui,3: Submit, NoHide
try
WB.Navigate(URL)
catch e
{
xxx:=e.Message
msgbox, 262208,ERROR,Error=`n%xxx%`n------------------------------------------`n
return
}
return
;-----------
Brb:
try{WB.GoBack()
}catch e{
;xxx:=e.Message
return
}
return
;--------------------
BrF:
try{WB.GoForward()
}catch e{
;xxx:=e.Message
return
}
return
;-------------------
class WB_events
{
NavigateComplete2(wb, NewURL)
{
GuiControl,3:, URL, %NewURL%
}
}
;========================= END SCRIPT ==================================