>
> From: Leston Drake <[EMAIL PROTECTED]>
> Subject: launch browser problem
> Date: Wed, 24 Jan 2001 10:17:32 -0700
> MIME-Version: 1.0
> Content-Type: text/plain; charset="us-ascii"; format=flowed
>
> Hello,
>
> A while back Kevin Miller shared this script to launch the default Internet
> browser, and go to a specific URL (on Win32):
>
> on launchWin32Browser httpDoc
> # httpDoc: URL
> local bApp
> local EXE_off
> put
> queryRegistry("hkey_local_machine\software\classes\http\shell\open\command\")
> into bApp
> if char 1 of bApp is quote then clear char 1 of bApp # strip leading quote
> put offset("EXE",bApp) into EXE_off
> put char 1 to (EXE_off+2) of bApp into bApp
> launch httpDoc with bApp
> end launchWin32Browser
>
> It works nicely.
> I've found, however, some unexpected behavior. When you call the routine,
> it launches the browser and loads the specified URL. If you leave the
> browser open and then call the routine again (e.g., with a different URL),
> nothing happens. The browser remains open to the 1st URL.
> This only happens
> when the browser has been opened with LAUNCH. In other words, if you open
> the browser manually (not through MetaCard), then another instance of the
> browser will be opened with LAUNCH.
>
> Is this standard behavior for the LAUNCH command?
> Is there some way to check to see if the app that was launched previously
> is still open?
> Is it possible to Close the app?
>
> Bottom line: I need to be able to go to another URL (in the browser)
> whether or not it was launched previously.
>
> Hmmm. I'm stumped. Any help GREATLY appreciated!
>
> Thanks in advance.
>
> Leston Drake, President
> LetterPress Software, Inc.
>
After Launch command MC opens process and then keeps track of it
You can check for open processes by..
put the number of lines in (the openprocesses) into nlines
put return && Nlines && "open process(es) registered.
or just
put (the openprocesses)
In my understanding you can't launch the process if it is already opened in MC
If you have browser already opened by MC you can "quit" it with
kill process bApp
and then launch it again with different URL
Best regards
Tariel Gogoberidze
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.