Your job is to open a browser window of the default browser to http://codegolf.stackexchange.com.
Your code must open the browser itself, and cannot rely on an open one.
This is code-golf, so the shortest answer in bytes wins.
Code Golf Stack Exchange is a question and answer site for programming puzzle enthusiasts and code golfers. It only takes a minute to sign up.
Sign up to join this communityYour job is to open a browser window of the default browser to http://codegolf.stackexchange.com.
Your code must open the browser itself, and cannot rely on an open one.
This is code-golf, so the shortest answer in bytes wins.
cheddar.internal(cheddar.uid).require("open").c("http://ppcg.ga")
Accesses cheddar internals and then calls upon open
package and calls it with string to PPCG. Make sure you have open
npm package installed
browse http://codegolf.stackexchange.com
ppcg.ga
no longer works, so needed to include the full domain name. But its funny that Red has its own URL data type!
require('child_process').exec('open http://ppcg.lol')
Works on mac.
ppcg.lol
has been unregistered, invalidating this answer :I However, I just registered ppcg.ga
, so you can use that instead, saving a byte anyway.
\$\endgroup\$
url_open('http://ppcg.ga')
<?php exec("open http:ppcg.lol");
<?php exec("start http:ppcg.lol");
ppcg.lol
has been unregistered, invalidating this answer :I However, I just registered ppcg.ga
, so you can use that instead, saving a byte anyway.
\$\endgroup\$
#include <cstdlib>
main(){system("xdg-open http:ppcg.lol");}
Just a rip off of the bash solution using system, and it only works on systems using the freedesktop tools. Also shortened by using the short link some kindly provided, otherwise it would be much longer.
ppcg.lol
has been unregistered, invalidating this answer :I However, I just registered ppcg.ga
, so you can use that instead, saving a byte anyway.
\$\endgroup\$
Requires the Browser::Open
module.
use Browser::Open;open_browser 'http:ppcg.ga'
import os
os.system("open http:ppcg.ga")
ppcg.lol
has been unregistered, invalidating this answer :I However, I just registered ppcg.ga
, so you can use that instead, saving a byte anyway.
\$\endgroup\$
class P{static void Main(string[]a){System.Diagnostics.Process.Start("http://ppcg.ga");}}
Not sure that it's possible to write a full class (with the System.Diagnostics reference) any shorter.
Inside main method only without references, 32 bytes:
Process.Start("http://ppcg.ga");
ppcg.lol
has been unregistered, invalidating this answer :I However, I just registered ppcg.ga
, so you can use that instead, saving a byte anyway.
\$\endgroup\$
-1 byte thanks to MD XF
]Open http://ppcg.ga
Uses the User Command ]Open, which is installed with Dyalog.
* Command Execution Failed: File not found
\$\endgroup\$
ppcg.lol
has been unregistered, invalidating this answer :I However, I just registered ppcg.ga
, so you can use that instead, saving a byte anyway.
\$\endgroup\$
Sub Main()
ThisWorkbook.FollowHyperlink("http://codegolf.stackexchange.com")
End Sub
ThisWorkbook.FollowHyperlink"http://codegolf.stackexchange.com
, and you should also probably change the language to be Excel VBA, as this explicitly uses the Excel.Workbook object
\$\endgroup\$
Jan 7 at 16:36
browseURL("http://ppcg.lol")
(in utils
package)
ppcg.lol
has been unregistered, invalidating this answer :I However, I just registered ppcg.ga
, so you can use that instead, saving a byte anyway.
\$\endgroup\$
的 webbrowser im**;o&('http:ppcg.ga')
Save this shell script as SXexec.sh
to your SX directory:
#!/bin/sh
N=$1.py;python Main.py $1;wine SXCompiler.exe $N;rm $N;python $N.py;rm $N.py
The script features tidying up after execution. To execute the above script, you need to have Wine and Python. Usage is like this:
SXexec.sh file
__import__('webbrowser').open('ppcg.ga')
Shorter version of everything else.
CreateObject("WScript.Shell").Run"http:ppcg.gq"
main(){system("start http:ppcg.ga");}
It's for Windows.
URL, 58 bytes
[InternetShortcut]
URL=https://codegolf.stackexchange.com
In Windows create a file "url.URL", with a code editor put the code.