Page 6 of 7

Re: Get the URL of the current (active) browser tab

Posted: 04 Jan 2018, 12:05
by atnbueno
Ouch :wtf:

I'm looking into it. The URL is still there, and it's accessible via ACC, so it looks promising :think:

Big thanks to Kudos for the heads up :thumbup:


Regards,
Antonio

Re: Get the URL of the current (active) browser tab

Posted: 04 Jan 2018, 12:26
by JnLlnd
Good news! Thanks atnbueno.

Re: Get the URL of the current (active) browser tab

Posted: 05 Jan 2018, 21:13
by SOTE
atnbueno wrote:Ouch :wtf:

I'm looking into it. The URL is still there, and it's accessible via ACC, so it looks promising :think:

Big thanks to Kudos for the heads up :thumbup:


Regards,
Antonio
Could this script be modified to get the Status Bar information (or whatever it's called now) at the bottom left of most browsers?

Re: Get the URL of the current (active) browser tab

Posted: 06 Jan 2018, 03:28
by atnbueno
No, sorry. The status bar is not available via the API this script is based on.

BUT it's trivial to access it via JavaScript: https://developer.mozilla.org/en-US/doc ... dow/status

Re: Get the URL of the current (active) browser tab

Posted: 17 Jan 2018, 12:44
by JasonDavisFL
Is there a way to get a list of all browser tabs open in chrome?

Re: Get the URL of the current (active) browser tab

Posted: 06 Feb 2018, 10:27
by DigiDon
Hello all,

I was using this great script in one of my program and have been informed that it had some problems in Firefox.

Atnbueno, did you make progress on the fix? Any hint ?

JnLlnd or Jeeswg : any new info on the bug?

Thanks! ;)

EDIT : I have just tested JnLlnd's script in previous page and the URL in Firefox 58 seem to work well (I have tried 5/6 urls).
So does someone still have a problem? Can we have a URL example of where it was failing?

Re: Get the URL of the current (active) browser tab

Posted: 07 Feb 2018, 08:59
by JnLlnd
DigiDon wrote:I have just tested JnLlnd's script in previous page and the URL in Firefox 58 seem to work well (I have tried 5/6 urls).
So does someone still have a problem? Can we have a URL example of where it was failing?
I retested it with 57.0.4 and upgraded to 58.0.1 today and found no URL not working with both versions. This is kind of good news :-)

Re: Get the URL of the current (active) browser tab

Posted: 07 Feb 2018, 09:01
by DigiDon
cool ! :D
So maybe a glitch on Firefox side ! eheh

Re: Get the URL of the current (active) browser tab

Posted: 09 Feb 2018, 12:55
by JoeSchmoe
Thanks for continuing to maintain, ATNBueno. You're the best. :)

Re: Get the URL of the current (active) browser tab

Posted: 18 Feb 2018, 02:20
by iHaveDepression
how exactly can I use this script?

Re: Get the URL of the current (active) browser tab

Posted: 27 Feb 2018, 14:06
by rangerr
Is it possible to have this code activate a hotstring only if the tab URL contains a string?

Re: Get the URL of the current (active) browser tab

Posted: 01 Mar 2018, 00:44
by RobbieWilkes
rangerr wrote:Is it possible to have this code activate a hotstring only if the tab URL contains a string?
Ultimately I'd like to know the same thing, as it would save me some lines of code in order to determine which page I was on, and not have to eliminate each option.

I am really at the learning phase of AHK, and am still figuring out the big stuff, but, my goal would be to use the functionality in my YouTubeTV script. There are, currently, essentially 4 different URLs used

youtubetv.com/
youtbetv.com/library
youtubetv.com/live
youtubetv.com/watch/gobbledlygoop (where the gobbledygoop is, apparently, random text related to the currently playing live video)

When not on the "watch" (live video) URL, I'd like for my MCE Remote direction buttons (right, left, up, down) to move the mouse in the appropriate direction, using "MouseMove", but, when on the "watch" screen, it will use those buttons for video control (Left - jump back / Right / jump forward).

Of course, since the "gobbledygoop" is there, I'll have to code for all the OTHER screens, unless I can parse or test the variable.

Could it be done with an "if Var contains" statement?

if sURL contains watch
Send Right
else
MouseMove 100, 0, 1, R
Return

Anyway, thanks for the awesome work! As I learn more, this is going to be extremely handy!

Re: Get the URL of the current (active) browser tab

Posted: 01 Mar 2018, 20:08
by RobbieWilkes
rangerr wrote:Is it possible to have this code activate a hotstring only if the tab URL contains a string?
Works like a champ. I'm very happy!

Right::
{
sURL := GetActiveBrowserURL()
WinGetClass, sClass, A
if sURL contains watch
send l
else
MouseMove 250, 0, 1, R
Return
}

Thanks atnbueno for your awesome work! Don't guess you'd have any idea how to SEND a URL to Chrome while in Kiosk mode, would you? :D

Re: Get the URL of the current (active) browser tab

Posted: 18 Apr 2018, 06:49
by amanvista

Re: Get the URL of the current (active) browser tab

Posted: 16 May 2018, 18:35
by zhanglei1371
Hi everyone,my browser is 360se,and the class is 360se6_Frame.
I used the code in page 1,then it poped the message:
"Not a browser or browser not supported (360se6_Frame)"
how to modify to fit the 360se?
Thx.
my brower download url:
http://down.360safe.com/se/360se9.1.0.420.exe

Re: Get the URL of the current (active) browser tab

Posted: 03 Jul 2018, 03:25
by Kudos
Hey Antonio,

I was wondering if you know how to make your script work for Brave browser - https://brave.com/

Thanks!
Kudos

Re: Get the URL of the current (active) browser tab

Posted: 03 Jul 2018, 07:10
by garry
just an example for firefox

Code: Select all

;- alt+ctrl+F   example copy url in firefox
#If WinExist("ahk_exe firefox.exe")
clipboard=
return

!^F::
WinActivate
sleep,500
sendinput,!s
sleep,500
sendinput, ^c
clipwait,2
URL:=clipboard
msgbox,%url%
clipboard=
url=
return
#If

Re: Get the URL of the current (active) browser tab

Posted: 13 Jul 2018, 16:57
by IBARON
Hi, The Code From The First Post Works On All Browsers Except Firefox Version 61 Where It Bombs Out With Error 0x80004003
Invalid Pointer accChildCount Any Solution Please
please don't duplicate posts!

Re: Get the URL of the current (active) browser tab

Posted: 03 Aug 2018, 13:15
by Johnny R
I have the same problem. The script doesn't work with Firefox v61.0.1. The row Acc_Init(), cChildren:=Acc.accChildCount, Children:=[] causes the Error 0x800706B5 - Die Schnittstelle ist unbekannt (The interface is unknown). Is there a solution, please ?
Image

Re: Get the URL of the current (active) browser tab

Posted: 05 Aug 2018, 00:07
by AHKStudent
in chrome 67 and 68 if you have a new tab window as the main window this wont work

to test click to get a new tab in chrome and then run to get list of windows, u will get blank even if you have 5 other regular websites opne