Browser Launch Revisited
Monte Goulding
monte.goulding at senet.com.au
Wed May 29 23:59:01 EDT 2002
Just a quick modification:
on launchFile pFileName
set the hideConsoleWindows to true
put empty into theTitle
if "NT" is in the systemVersion then
set the shellCommand to "cmd.exe"
put quote & quote into theTitle
end if
get shell("start" && theTitle && quote & pFileName & quote)
end launchFile
I renamed it to launchFile because this will launch any file that has the
correct registry settings. You can use a url or a full file path. The quotes
around the file name will ensure that a local file with spaces in the path
is seen as one command line argument.
Regards
Monte
-----Original Message-----
From: metacard-admin at lists.runrev.com
[mailto:metacard-admin at lists.runrev.com]On Behalf Of Scott Rossi
Sent: Thursday, 30 May 2002 4:01 AM
To: metacard at lists.runrev.com
Subject: Browser Launch Revisited
Hi List Folks:
Here's some more on launching URLs in Web browsers...
You may recall a post recently that mentioned the use of shell command in
MC/Rev to launch a URL. After tracking down a formatting issue (with help
from Scott Raney and Michael Kahn), it appears the handler below could be a
reliable option for launching URLs on Windows.
on launchBrowser theURL
set the hideConsoleWindows to true
put empty into theTitle
if "NT" is in the systemVersion then
set the shellCommand to "cmd.exe"
put quote & quote into theTitle
end if
get shell("start" && theTitle && theURL)
end launchBrowser
Passing a URL to this handler should launch the URL in the default browser
on any system from Win95 to XP, even with parameters included in the URL
string. If the handler fails for you, let me know off list what your
findings are. Testing here on Win95/98/2K/XP appeared to work in all cases.
Assuming the above works, I'll post a Primer at some point about various
Mac/Win URL launch methods.
Regards,
Scott Rossi
Creative Director
Tactile Media, Multimedia & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com
_______________________________________________
metacard mailing list
metacard at lists.runrev.com
http://lists.runrev.com/mailman/listinfo/metacard
More information about the metacard
mailing list