Open Default Internet Browser?

Posted by MattMc on Thu 04 Sep 2003 12:39 AM — 2 posts, 13,530 views.

USA #0
Is there anyway to open an internet browser using scripts? I don't do the uber-code, only the basic stuff... so I was wondering if a syntax like "openurl http://server.com/mush.php?remoteadmin&user=%1&command=%2 target=_mushadmin"

or something cool like that... this would be used for us people who can code in php but not in any other language ;P if this were developable in a plugin that would be cool too... just how to do it?


Matt, the Perl confused.
USA #1
Here is a workable solution:

dim url
dim WshShell
url = "www.yahoo.com"
set WshShell = CreateObject("WScript.Shell")
WshShell.Run "rundll32 url.dll,FileProtocolHandler " + url
WshShell = ""

There may be a more direct means of gaining a handle to the rul.dll function of rundll32, but I haven't been able to find one. This is also limited, in theat it will open the window in the default browser, but unlike doing something like using createobject("IE.application"), you have no actual control over any of the browsers functions. You can't even have mushclient close it for you at some later point.

This I believe does mean that all file types will be directed through the file associations. This means you can probably use it to auto-open 'any' file type in the appropriate program.