Scott suggests:

[snip]
> if "Win" is in platform() then
>  put tCode into url ("file:" &tLaunchPath)
>  set the hideConsoleWindows to true
>  put empty into tTitle
>  if "NT" is in systemVersion() then ##
>   set the shellCommand to "cmd.exe"
>   put quote &quote into tTitle
>  end if
>  get shell("start" &&tTitle &&quote &tURL &quote)
> end if
[endSnip]

In order to catch all of Win95/98/2K/XP/NT/ME, I would only modify the shellCommand test to read...

  if ("NT" is in the systemVersion) or ("Windows 4.90" is in the systemVersion) ##


Also, if you get the default browser to launch direct without using a temp file, Scott's excellent original post back in May 2002 to the mc list and for which I shall hate him forever ;)...

on launchBrowser theURL
   set the hideConsoleWindows to true
   put empty into theTitle
   if ("NT" is in the systemVersion) or ("Windows 4.90" 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

it may be useful to add a simple error trap in case the URL is already displayed with

if the result is not empty then
  answer "Please click the REFRESH buton in your browser."
end if

/H

Reply via email to