Is there a simple way to check whether the specified Markdown file is already opened in Chrome? (Or another browser)
* In case the target file is not currently opened in Chrome - open it in Chrome.
* In case the target file is already opened in Chrome - activate Chrome at the specified tab.
Yes, I understand that this task is probably large and/or complicated. And thus, it will not be polite to expect that someone will publish entire code. However any ideas and drafts are welcome. It is possible that there exist some AHK library or community function for it.
To check if file is opened in browser and then activate the corresponding tab
Re: To check if file is opened in browser and then activate the corresponding tab
If the tab name is sufficient to identify the file, you could use this:
Firefox/Chrome, get tab names/focus tab - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=26947
If you need the url to identify the file, you could download a plugin to copy titles/urls to the clipboard, and parse the clipboard text, and then use the functions above:
Firefox/Chrome: copy titles/urls to the clipboard - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=22&t=66246
Otherwise you could use SendInput, ^{Tab}, Sleep, and WinGetTitle.
Firefox/Chrome, get tab names/focus tab - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=6&t=26947
If you need the url to identify the file, you could download a plugin to copy titles/urls to the clipboard, and parse the clipboard text, and then use the functions above:
Firefox/Chrome: copy titles/urls to the clipboard - AutoHotkey Community
https://autohotkey.com/boards/viewtopic.php?f=22&t=66246
Otherwise you could use SendInput, ^{Tab}, Sleep, and WinGetTitle.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
Who is online
Users browsing this forum: Bing [Bot], Marium0505, mcl and 343 guests