Ahk renaming Chrome tabs Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
strom

Ahk renaming Chrome tabs

20 Jul 2018, 23:01

Hi,

Is it possible to use AHK to rename chrome tabs?

IE: I use AHK to open several webpage and I want to rename them like 1,2,3,4,5 then use AHK to open these pages with title depending on where my variable want to go.
Like -> open 10 pages, name them 1,2,3,4,5,6,7,8,9,10 in the order the page was open. In a loop my variable change according to where it need to go. variable = X, focus
page X, do things then continue the loop to other pages.
strom

Re: Ahk renaming Chrome tabs

22 Jul 2018, 14:49

I read somewhere that ahk could rename chrome tab or so

Anyone know how?
User avatar
ankitkraken
Posts: 84
Joined: 01 Jun 2019, 08:47
Location: India

Re: Ahk renaming Chrome tabs

17 Jul 2021, 01:24

Man, I came looking for the same thing. Sad that no one has looked at this thread.
User avatar
ankitkraken
Posts: 84
Joined: 01 Jun 2019, 08:47
Location: India

Re: Ahk renaming Chrome tabs  Topic is solved

17 Jul 2021, 06:17

Found this code somewhere. It's working to rename the Chrome Tabs.
But the name would reset if you close the tab or refresh it.

Code: Select all

driver.executeScript("document.title = 'new_title'")
This renames the tab to = new_title. To use a variable value as new tab name use the following code:

Code: Select all

new_title_script := "document.title = '" var_new_title "'"
driver.executeScript(new_title_script)
gregster
Posts: 9054
Joined: 30 Sep 2013, 06:48

Re: Ahk renaming Chrome tabs

17 Jul 2021, 06:28

@ankitkraken:
Well, without the executescript() function/method, this won't do anything. Where does driver point to?
Is it Selenium-related, or the Acc.ahk-approach, or something else?
(Of course, the js-snippet setting the page title can be used with either approach.)

It would probably help if you would link to this "somewhere" where you found it.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 459 guests