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