jeudi 27 mai 2021

how can you use cmd or .bat files to open a url over your current tab? [closed]

Fixed my last post (see edit):

currently I'm using

@ECHO OFF rundll32 url.dll,FileProtocolHandler https://www.example.com

which works to open my desired Web page in the default browser, however it does so in a new tab/instance of browser. I'm looking for a command to put in a bat file which

  1. can be edited from a remote program, ( the same program which launches the .bat)
  2. opens the Web page in place of the current Web page, rather than opening a new tab

since it opens a new tab each time, you have to manually close the last tab loaded, as well as close the cookies dialogue, making it unergonomic

I can provide further context if required

Edit: this isn't working on the assumption that someone want to accept cookies. If someone was to manually enter the URL of the same website, with a different directory, the browser has already saved their preference as to whether or not they wish to accept cookies. My current command opens the page in a new tab, and asks for their preference regardless of whether or not they have previously Accepted or declined it.

Also, I don't actually plan to distribute this software, so since someone said "there's too wide a variety of browsers with different protocols", I'd be willing to confine the command to a singular browser, preferably Firefox- this would allow if to work on my PC for testing purposes, and I can attempt to make alterations to make it more compatible with other devices and browsers if I so wanted.




Aucun commentaire:

Enregistrer un commentaire