Author Topic: Re: opening urls in chrome browser  (Read 933 times)

0 Members and 1 Guest are viewing this topic.

Offline euklides

  • Forum Regular
  • Posts: 128
    • View Profile
Re: opening urls in chrome browser
« on: June 21, 2019, 05:38:50 am »
Why copying chrome into the working folder ????

Find the real folder of Chrome !

Exemple (with opera and firefox):

url$ = "
"

'Starting with opera:
prog$ = "C:\Program Files\Opera\launcher.exe"
SHELL _HIDE CHR$(34) + prog$ + CHR$(34) + " " + CHR$(34) + url$ + CHR$(34)



'starting with firefox:
prog$ = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
SHELL _HIDE CHR$(34) + prog$ + CHR$(34) + " " + CHR$(34) + url$ + CHR$(34)

Why not yes ?

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Re: opening urls in chrome browser
« Reply #1 on: June 21, 2019, 07:01:08 am »
Isn't the easiest way to just shell out the http itself, and let the OS choose which browser to associate and open it with?

Code: QB64: [Select]
  1. url$ = "[youtube]https://www.youtube.com/watch?v=rnKbImRPhTE[/youtube]"
  2. IF INSTR(_OS$, "[WINDOWS]") THEN
  3.     SHELL _HIDE url$
  4.     SHELL _HIDE "xdg-open " + url$
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Marked as best answer by on August 11, 2021, 10:30:29 am

Offline euklides

  • Forum Regular
  • Posts: 128
    • View Profile
Re: opening urls in chrome browser
« Reply #2 on: June 22, 2019, 04:12:55 am »
Of course, the way of  SMcNeill is the best!

But if you want to use for instance Opera (with his VPN mode), and your usual web browser is Firefox, my code will be the good one...
Why not yes ?