Tuviah M Snyder:
If the browser is already open does using the launch command start a
second instance of it?
Marni Centor:
Yes. I have been unable to find a way around this. Any suggestions are
welcome.
The following for me has handled NN and MSIE on 95, 98 and NT and
accommodates second instances. If it falls over for you, perhaps you would
let me know as I now use it as a stock library item:
-----
Internet access
-----
on launchURL tURL
-- Full file or http address path required inc. http:// or ftp:// prefix
if the platform="win32" then
get
queryRegistry("hkey_local_machine\software\classes\http\shell\open\command\")
put offset(".exe",it)+3 into offset1
repeat until the num of chars in it=offset1
delete last char of it
end repeat
if the last char of it is numToChar(0) then
delete last char of it
end if
if the last char of it is quote then
delete last char of it
end if
if the first char of it is quote then
repeat until the first char of it is not quote
delete first char of it
end repeat
end if
put it&&tURL into tURL
open process tURL for neither
put the result into tResult
if tResult<>"" then
set the itemDel to "\"
put last item of tURL into tFile
get smartAnswer("Process already open",kwote(tFile)&&"has been
updated but it cannot be displayed because another instance is already
open. Close the window first, then try again.","Cancel")
end if
else -- Mac only
--if "http://" is not in tURL then send "http://"&tURL to program
"Finder" with "GURLGURL"
--else send tURL to program "Finder" with "GURLGURL"
send tURL to program "Finder" with "GURLGURL"
end if
end launchURL
/H
Hugh Senior
The Flexible Learning Company
Consultant Programming
Voice/Fax: +44.[0]1483.27 87 27
eMail: mailto:[EMAIL PROTECTED]
Web: http://www.flexibleLearning.com