Get the URL of the current (active) browser tab

Post your working scripts, libraries and tools
User avatar
atnbueno
Posts: 85
Joined: 12 Oct 2013, 04:45

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

04 Jan 2018, 12:05

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
User avatar
JnLlnd
Posts: 261
Joined: 29 Sep 2013, 21:29
GitHub: JnLlnd
Location: Montreal, Quebec, Canada
Contact:

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

04 Jan 2018, 12:26

Good news! Thanks atnbueno.
Author of freeware apps Quick Access Popup (http://www.quickaccesspopup.com),
FoldersPopup and CSV Buddy (http://code.jeanlalonde.ca)
SOTE
Posts: 75
Joined: 15 Jun 2015, 06:21

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

05 Jan 2018, 21:13

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?
User avatar
atnbueno
Posts: 85
Joined: 12 Oct 2013, 04:45

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

06 Jan 2018, 03:28

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
JasonDavisFL
Posts: 9
Joined: 12 Jan 2018, 13:05
Facebook: JasonDavis83
GitHub: JasonDavisFL

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

17 Jan 2018, 12:44

Is there a way to get a list of all browser tabs open in chrome?
DigiDon
Posts: 120
Joined: 19 May 2014, 04:55
Contact:

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

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?
EverFastAccess : Take Notes on anything the Fast way!
Knowledge is knowing a tomato is a fruit; wisdom is not putting it in a fruit salad. (Miles Kington)
User avatar
JnLlnd
Posts: 261
Joined: 29 Sep 2013, 21:29
GitHub: JnLlnd
Location: Montreal, Quebec, Canada
Contact:

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

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 :-)
Author of freeware apps Quick Access Popup (http://www.quickaccesspopup.com),
FoldersPopup and CSV Buddy (http://code.jeanlalonde.ca)
DigiDon
Posts: 120
Joined: 19 May 2014, 04:55
Contact:

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

07 Feb 2018, 09:01

cool ! :D
So maybe a glitch on Firefox side ! eheh
EverFastAccess : Take Notes on anything the Fast way!
Knowledge is knowing a tomato is a fruit; wisdom is not putting it in a fruit salad. (Miles Kington)
JoeSchmoe
Posts: 33
Joined: 08 Dec 2014, 08:58

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

09 Feb 2018, 12:55

Thanks for continuing to maintain, ATNBueno. You're the best. :)
iHaveDepression
Posts: 1
Joined: 18 Feb 2018, 01:43

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

18 Feb 2018, 02:20

how exactly can I use this script?
rangerr
Posts: 2
Joined: 26 Feb 2018, 14:35

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

27 Feb 2018, 14:06

Is it possible to have this code activate a hotstring only if the tab URL contains a string?
User avatar
RobbieWilkes
Posts: 12
Joined: 27 Feb 2018, 21:52
Facebook: https://www.facebook.com/robbiewilkes

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

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!
User avatar
RobbieWilkes
Posts: 12
Joined: 27 Feb 2018, 21:52
Facebook: https://www.facebook.com/robbiewilkes

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

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
zhanglei1371
Posts: 19
Joined: 05 Aug 2014, 02:01

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

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

Return to “Scripts and Functions”

Who is online

Users browsing this forum: No registered users and 14 guests