Pass A URL to cover all Win bases

FlexibleLearning at aol.com FlexibleLearning at aol.com
Wed Aug 13 04:23:00 EDT 2003


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.runrev.com/pipermail/use-livecode/attachments/20030813/2eb3f3ea/attachment.html>


More information about the use-livecode mailing list