I use adblocker in Firefox and Chrome uBlockOrigin , but here in ahk script activeX not works
here is a Internetbrowser script with DropDownList , I can't start your video 'Lewis Capaldi' , other worked
Code: Select all
;- Internetbrowser play also Youtube-Video
;- Modified=20200217
;- Created =20200217
#warn
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode 2
SetBatchLines, -1
CoordMode, Mouse , Relative ;- GUI
DetectHiddenWindows, On
filename1=InternetBrowser
title:=""
lasttitle:=""
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,s12 cYellow,Lucida Console
;=============================================================
xxa=Shell.Explorer ;- IExplorer
;xxa=Mozilla.Browser ;- Mozilla Firefox
transform,s,chr,32
e5x=
(Ltrim join|
Lilian de Celis - ElRelicario ,https://www.youtube.com/embed/eKZhI2r9J8U?autoplay=1
Lewis Capaldi - Someone You Loved ,https://www.youtube.com/embed/zABLecsR5UE
Gloria Lasso Etranger au paradies ,https://www.youtube.com/embed/l9lw-zQcZ58?autoplay=1
Li xiang lan - Ye lai xiang ,https://www.youtube.com/embed/iR0w0mWB3uA?autoplay=1
Grace Chang Ge Lan - Calypso ,https://www.youtube.com/embed/ZIfpCLrjXVU?autoplay=1
Felix FeFe Blog ,http://blog.fefe.de/?css=
Autohotkey ,https://www.autohotkey.com/
%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*17)/xx,w:=(wa*20)/xx
Gui,3:Add,DDL,x%x% y%y% w%w% h%h% cBlack vUrlDDL gAA,%e5x%
Fix := True
if Fix
Prev := FixIE()
x:=(wa*.2)/xx,y:=(ha*3)/xx,h:=(ha*59)/xx,w:=(wa*63)/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*74)/xx,w:=(wa*65)/xx
Gui,3:show,x%x% y%y% w%w% h%h%,%filename1%
GuiControl,3: ChooseString,urlddl,Lewis
sleep,1000
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)
if Fix
FixIE(Prev)
}
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
;msgbox, 262208,ERROR,Error=`n%xxx%`n------------------------------------------`n
return
}
return
;--------------------
BrF:
try{WB.GoForward()
}catch e{
;xxx:=e.Message
;msgbox, 262208,ERROR,Error=`n%xxx%`n------------------------------------------`n
return
}
return
;-------------------
class WB_events
{
NavigateComplete2(wb, NewURL)
{
GuiControl,3:, URL, %NewURL% ;- Update the URL edit control.
}
}
;----------------------
;- for play youtube
FixIE(Version=0, ExeName="")
{
static Key := "Software\Microsoft\Internet Explorer"
. "\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION"
, Versions := {7:7000, 8:8888, 9:9999, 10:10001, 11:11001}
if Versions.HasKey(Version)
Version := Versions[Version]
if !ExeName
{
if A_IsCompiled
ExeName := A_ScriptName
else
SplitPath, A_AhkPath, ExeName
}
RegRead, PreviousValue, HKCU, %Key%, %ExeName%
if (Version = "")
RegDelete, HKCU, %Key%, %ExeName%
else
RegWrite, REG_DWORD, HKCU, %Key%, %ExeName%, %Version%
return PreviousValue
}
return
;-----------------------------------------------------
;=============================================================