Get the URL of the current (active) browser tab

Post a reply

Confirmation code
Enter the code exactly as it appears. All letters are case insensitive.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :| :mrgreen: :geek: :ugeek: :arrow: :angel: :clap: :crazy: :eh: :lolno: :problem: :shh: :shifty: :sick: :silent: :think: :thumbup: :thumbdown: :salute: :wave: :wtf: :yawn: :facepalm: :bravo: :dance: :beard: :morebeard: :xmas: :HeHe: :trollface: :cookie: :rainbow: :monkeysee: :monkeysay: :happybday: :headwall: :offtopic: :superhappy: :terms: :beer:
View more smilies

BBCode is ON
[img] is OFF
[flash] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Get the URL of the current (active) browser tab

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

by JnLlnd » 19 Aug 2018, 13:22

I confirm. This works with Firefox v61.0.2:
https://autohotkey.com/boards/viewtopic ... 81#p182981

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

by Johnny R » 18 Aug 2018, 08:09

I've reinstalled the newest version of the script and the problem was solved. The script works fine with Firefox v61.0.2. Thank You all!

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

by Johnny R » 09 Aug 2018, 02:35

No atnbueno, no solution. Where is atnbueno?

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

by JnLlnd » 05 Aug 2018, 16:14

AHKStudent wrote: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
@AHKStudent: If we are talking of the same function GetActiveBrowserURL(), this function retrieves the active tab's URL. What you describe is not an error since there is no URL to retrieve in a blank tab.

@atnbueno: I hope you or another wizard here will be able to look into the Firefox issue...

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

by AHKStudent » 05 Aug 2018, 00:07

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

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

by Johnny R » 03 Aug 2018, 13:15

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

by IBARON » 13 Jul 2018, 16:57

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

by garry » 03 Jul 2018, 07:10

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

by Kudos » 03 Jul 2018, 03:25

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

by zhanglei1371 » 16 May 2018, 18:35

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

by amanvista » 18 Apr 2018, 06:49

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

by RobbieWilkes » 01 Mar 2018, 20:08

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

by RobbieWilkes » 01 Mar 2018, 00:44

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

by rangerr » 27 Feb 2018, 14:06

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

by iHaveDepression » 18 Feb 2018, 02:20

how exactly can I use this script?

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

by JoeSchmoe » 09 Feb 2018, 12:55

Thanks for continuing to maintain, ATNBueno. You're the best. :)

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

by DigiDon » 07 Feb 2018, 09:01

cool ! :D
So maybe a glitch on Firefox side ! eheh

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

by JnLlnd » 07 Feb 2018, 08:59

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

by DigiDon » 06 Feb 2018, 10:27

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

by JasonDavisFL » 17 Jan 2018, 12:44

Is there a way to get a list of all browser tabs open in chrome?

Top