comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Open URL in external browser
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Open URL in external browser [message #69828] Thu, 18 February 2010 01:32
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Feb 18, 12:47 am, Dave_Poreh <d.po...@gmail.com> wrote:
> On Feb 17, 3:13 pm, Rob <rob.webina...@gmail.com> wrote:> On Feb 17, 1:38 pm, mgalloy <mgal...@gmail.com> wrote:
>
>>> On 2/17/10 11:37 AM, Rob wrote:
>
>>>> On Feb 17, 11:22 am, mgalloy<mgal...@gmail.com>  wrote:
>>>> > On 2/17/10 11:13 AM, Rob wrote:
>
>  Another suggested solution from a friend to my "open url in browser
>
>> query" is given as:
>> oJavaDesktop = OBJ_NEW('IDLJavaObject$Static$JAVA_AWT_DESKTOP',
>> 'java.awt.Desktop')
>> oJavaURI = OBJ_NEW('IDLJavaObject$JAVA_NET_URI', 'java.net.URI',
>> 'http://www.cnn.com/')
>
>> if (oJavaDesktop->isDesktopSupported()) then begin
>>   oBrowser = oJavaDesktop->getDesktop();
>>   oBrowser->browse,oJavaURI
>>   OBJ_DESTROY, oBrowser
>> endif
>
>> ;Remove Objects
>> OBJ_DESTROY, oJavaURI, oJavaDesktop
>
> Hi Rob
> Could you please tell us how the last method works in a widgent?
> Cheers
> Dave

Oh!!!!
Thanks Rob. I found it. Great work.
Cheers
Dave
Re: Open URL in external browser [message #69829 is a reply to message #69828] Thu, 18 February 2010 00:47 Go to previous message
d.poreh is currently offline  d.poreh
Messages: 406
Registered: October 2007
Senior Member
On Feb 17, 3:13 pm, Rob <rob.webina...@gmail.com> wrote:
> On Feb 17, 1:38 pm, mgalloy <mgal...@gmail.com> wrote:
>
>
>
>
>
>> On 2/17/10 11:37 AM, Rob wrote:
>
>>> On Feb 17, 11:22 am, mgalloy<mgal...@gmail.com>  wrote:
>>>> On 2/17/10 11:13 AM, Rob wrote:
Another suggested solution from a friend to my "open url in browser
> query" is given as:
> oJavaDesktop = OBJ_NEW('IDLJavaObject$Static$JAVA_AWT_DESKTOP',
> 'java.awt.Desktop')
> oJavaURI = OBJ_NEW('IDLJavaObject$JAVA_NET_URI', 'java.net.URI',
> 'http://www.cnn.com/')
>
> if (oJavaDesktop->isDesktopSupported()) then begin
>   oBrowser = oJavaDesktop->getDesktop();
>   oBrowser->browse,oJavaURI
>   OBJ_DESTROY, oBrowser
> endif
>
> ;Remove Objects
> OBJ_DESTROY, oJavaURI, oJavaDesktop

Hi Rob
Could you please tell us how the last method works in a widgent?
Cheers
Dave
Re: Open URL in external browser [message #69831 is a reply to message #69829] Wed, 17 February 2010 15:13 Go to previous message
Rob[2] is currently offline  Rob[2]
Messages: 11
Registered: May 2007
Junior Member
On Feb 17, 1:38 pm, mgalloy <mgal...@gmail.com> wrote:
> On 2/17/10 11:37 AM, Rob wrote:
>
>
>
>
>
>> On Feb 17, 11:22 am, mgalloy<mgal...@gmail.com>  wrote:
>>> On 2/17/10 11:13 AM, Rob wrote:
>
>>>> Is there a native IDL method for opening a URL (e.g.
>>>> http://spidr.ngdc.noaa.gov/spidr/servlet/GetMetadata?param=i ono.WI937)
>>>> in a browser?  I'm not looking for a "spawn" like executive solution.
>>>> I'm building a tool that must work on many OS's including OSx,
>>>> Windows, possibly Linux.
>
>>>> I looked into the "online_help" procedure which seems to work only for
>>>> local (a la file://) content.
>
>>> Here's my solution:
>
>>>   http://michaelgalloy.com/wp-content/uploads/2010/02/mg_open_ url.pro
>
>>> It is a "spawn" solution, but has separate cases for the different
>>> operating systems. Mac OS X and Windows have nice (though different)
>>> ways to open the default web browser on the URL. On other Unix systems,
>>> a file dialog will come up to select your web browser. It will remember
>>> your choice, so you only have to choose once (I suppose I should add a
>>> keyword to force the choice so that you can change your mind later).
>
>>> Mike
>>> --www.michaelgalloy.com
>>> Research Mathematician
>>> Tech-X Corporation
>
>> Awesome, thanks!  I'm going to use this next week at the IDL/LASP
>> workshop.
>
> Cool, at the IDL User Group meeting at LASP? I will be there as well.
>
> Mike
> --www.michaelgalloy.com
> Research Mathematician
> Tech-X Corporation

Yes, I'm giving:
IDL driven Space Physics Modeling and Investigations
See you there!

Another suggested solution from a friend to my "open url in browser
query" is given as:
oJavaDesktop = OBJ_NEW('IDLJavaObject$Static$JAVA_AWT_DESKTOP',
'java.awt.Desktop')
oJavaURI = OBJ_NEW('IDLJavaObject$JAVA_NET_URI', 'java.net.URI',
'http://www.cnn.com/')

if (oJavaDesktop->isDesktopSupported()) then begin
oBrowser = oJavaDesktop->getDesktop();
oBrowser->browse,oJavaURI
OBJ_DESTROY, oBrowser
endif

;Remove Objects
OBJ_DESTROY, oJavaURI, oJavaDesktop
Re: Open URL in external browser [message #69834 is a reply to message #69831] Wed, 17 February 2010 12:38 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 2/17/10 11:37 AM, Rob wrote:
> On Feb 17, 11:22 am, mgalloy<mgal...@gmail.com> wrote:
>> On 2/17/10 11:13 AM, Rob wrote:
>>
>>> Is there a native IDL method for opening a URL (e.g.
>>> http://spidr.ngdc.noaa.gov/spidr/servlet/GetMetadata?param=i ono.WI937)
>>> in a browser? I'm not looking for a "spawn" like executive solution.
>>> I'm building a tool that must work on many OS's including OSx,
>>> Windows, possibly Linux.
>>
>>> I looked into the "online_help" procedure which seems to work only for
>>> local (a la file://) content.
>>
>> Here's my solution:
>>
>> http://michaelgalloy.com/wp-content/uploads/2010/02/mg_open_ url.pro
>>
>> It is a "spawn" solution, but has separate cases for the different
>> operating systems. Mac OS X and Windows have nice (though different)
>> ways to open the default web browser on the URL. On other Unix systems,
>> a file dialog will come up to select your web browser. It will remember
>> your choice, so you only have to choose once (I suppose I should add a
>> keyword to force the choice so that you can change your mind later).
>>
>> Mike
>> --www.michaelgalloy.com
>> Research Mathematician
>> Tech-X Corporation
>
> Awesome, thanks! I'm going to use this next week at the IDL/LASP
> workshop.

Cool, at the IDL User Group meeting at LASP? I will be there as well.

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
Re: Open URL in external browser [message #69835 is a reply to message #69834] Wed, 17 February 2010 10:37 Go to previous message
Rob[2] is currently offline  Rob[2]
Messages: 11
Registered: May 2007
Junior Member
On Feb 17, 11:22 am, mgalloy <mgal...@gmail.com> wrote:
> On 2/17/10 11:13 AM, Rob wrote:
>
>> Is there a native IDL method for opening a URL (e.g.
>> http://spidr.ngdc.noaa.gov/spidr/servlet/GetMetadata?param=i ono.WI937)
>> in a browser?  I'm not looking for a "spawn" like executive solution.
>> I'm building a tool that must work on many OS's including OSx,
>> Windows, possibly Linux.
>
>> I looked into the "online_help" procedure which seems to work only for
>> local (a la file://) content.
>
> Here's my solution:
>
>   http://michaelgalloy.com/wp-content/uploads/2010/02/mg_open_ url.pro
>
> It is a "spawn" solution, but has separate cases for the different
> operating systems. Mac OS X and Windows have nice (though different)
> ways to open the default web browser on the URL. On other Unix systems,
> a file dialog will come up to select your web browser. It will remember
> your choice, so you only have to choose once (I suppose I should add a
> keyword to force the choice so that you can change your mind later).
>
> Mike
> --www.michaelgalloy.com
> Research Mathematician
> Tech-X Corporation

Awesome, thanks! I'm going to use this next week at the IDL/LASP
workshop.
Re: Open URL in external browser [message #69838 is a reply to message #69835] Wed, 17 February 2010 10:22 Go to previous message
Michael Galloy is currently offline  Michael Galloy
Messages: 1114
Registered: April 2006
Senior Member
On 2/17/10 11:13 AM, Rob wrote:
> Is there a native IDL method for opening a URL (e.g.
> http://spidr.ngdc.noaa.gov/spidr/servlet/GetMetadata?param=i ono.WI937)
> in a browser? I'm not looking for a "spawn" like executive solution.
> I'm building a tool that must work on many OS's including OSx,
> Windows, possibly Linux.
>
> I looked into the "online_help" procedure which seems to work only for
> local (a la file://) content.

Here's my solution:

http://michaelgalloy.com/wp-content/uploads/2010/02/mg_open_ url.pro

It is a "spawn" solution, but has separate cases for the different
operating systems. Mac OS X and Windows have nice (though different)
ways to open the default web browser on the URL. On other Unix systems,
a file dialog will come up to select your web browser. It will remember
your choice, so you only have to choose once (I suppose I should add a
keyword to force the choice so that you can change your mind later).

Mike
--
www.michaelgalloy.com
Research Mathematician
Tech-X Corporation
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Coyote Cojones
Next Topic: Re: How to spot maximum x value AND corresponding y value?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:44:12 PDT 2025

Total time taken to generate the page: 0.00603 seconds