<HTML><FONT FACE=arial,helvetica><FONT SIZE=2 FAMILY="SANSSERIF" FACE="Arial" LANG="0">on launchURL tURL<BR>
# tURL can be a local file path, a web URL or an eMail address.<BR>
local tResult=""<BR>
if ("@" is not in tURL) and ("www." is not in tURL) and (there is not a file tURL) then<BR>
get smartAnswer("Error","This document cannot be found.","OK")<BR>
exit to top<BR>
end if<BR>
if (char 1 to 4 of tURL is "www.") then put "http://" before tURL<BR>
else if (tURL contains "@" and "mailto:" is not in tURL) then put "mailto:" before tURL<BR>
switch the platform<BR>
case "MacOS"<BR>
if "http://" is in tURL or "mailto:" is in tURL then<BR>
send tURL to program "Finder" with "GURLGURL"<BR>
else<BR>
replace "/" with ":" in tURL<BR>
if char 1 of tURL is ":" then delete char 1 of tURL<BR>
put quote&"Finder""e into tApp<BR>
put quote&tURL"e into tURL<BR>
put "tell application"&& tApp &cr&\<BR>
"open file"&&tURL &cr&\<BR>
"end tell" into tScript<BR>
do tScript as AppleScript<BR>
if "error" is in the result then put the result into tResult<BR>
end if<BR>
break<BR>
case "Win32"<BR>
set the hideConsoleWindows to true<BR>
put empty into tApp<BR>
if ("NT" is in the systemVersion) then<BR>
set the shellCommand to "cmd.exe"<BR>
put quote & quote into tApp<BR>
end if<BR>
get shell("start" && tApp && quote & tURL & quote)<BR>
if the result is not empty then put the result into tResult<BR>
break<BR>
end switch<BR>
if tResult is not empty then<BR>
get smartAnswer("The following error is reported",tResult,"OK")<BR>
end if<BR>
end launchURL<BR>
<BR>
<BR>
/H<BR>
<BR>
<BR>
_________________________________________________<BR>
Hugh Senior<BR>
The Flexible Learning Company<BR>
Consultant Programming & Software Solutions<BR>
Fax/Voice: +44 (0)1483.27 87 27</FONT></HTML>