Hack Forums
[Python] Script to open url in CURRENT tab in chrome? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Python] Script to open url in CURRENT tab in chrome? (/showthread.php?tid=4325966)



Script to open url in CURRENT tab in chrome? - faw323 - Jul 7, 2014

Is is a possible to make a python (or vbs, etc) script that will open a url in chrome but in the current active tab?

import webbrowser

new=2;

url="http://google.ca";

webbrowser.open(url,new=new)


This one opens it in a new tab, but how can I make it open the url in the current tab?


* - dberube - Jul 7, 2014

I don't think that is possible. Not with webbrowser that I'm certain.
Try to search if this was done in C++ or C. If it is, then python can do it.


* - Only3 - Jul 8, 2014

use this window.location = "http:// ..."