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

Home » Public Forums » archive » Re: Is there a way for a routine to know wether it was launched via commandline IDL or from within IDLDE?
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: Is there a way for a routine to know wether it was launched via commandline IDL or from within IDLDE? [message #82656] Thu, 10 January 2013 08:46
p_torres is currently offline  p_torres
Messages: 2
Registered: January 2013
Junior Member
Perfect, Thank you

On Thursday, January 10, 2013 7:41:54 AM UTC-8, wlandsman wrote:
> Examine the structure output of fstat(-1)
>
> e.g.
>
>
>
> idl> print,(stat(-1)).isagui will be true for the DE but not for a terminal
>
>
>
> On Thursday, January 10, 2013 8:27:25 AM UTC-5, p_to...@sbcglobal.net wrote:
>
>> Why I ask is: If a routine is launched from within the DE I would like it to display some info via a gui and if it were launched via a terminal then I would like the information printed out at the terminal. An example would be a progress bar. From the DE a nice gui progress bar shown and from the terminal just a textual output of percent complete.
>
>>
>
>>
>
>>
>
>> I was looking for a system variable that had this info but could not find one. Hopefully there is a simple solution and I'm just not seeing it.
>
>>
>
>>
>
>>
>
>> Pete
Re: Is there a way for a routine to know wether it was launched via commandline IDL or from within IDLDE? [message #82657 is a reply to message #82656] Thu, 10 January 2013 08:20 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
That should be

idl> print,(fstat(-1)).isagui

On Thursday, January 10, 2013 10:41:54 AM UTC-5, wlandsman wrote:
> Examine the structure output of fstat(-1)
>
Re: Is there a way for a routine to know wether it was launched via commandline IDL or from within IDLDE? [message #82659 is a reply to message #82657] Thu, 10 January 2013 07:41 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
Examine the structure output of fstat(-1)
e.g.

idl> print,(stat(-1)).isagui will be true for the DE but not for a terminal

On Thursday, January 10, 2013 8:27:25 AM UTC-5, p_to...@sbcglobal.net wrote:
> Why I ask is: If a routine is launched from within the DE I would like it to display some info via a gui and if it were launched via a terminal then I would like the information printed out at the terminal. An example would be a progress bar. From the DE a nice gui progress bar shown and from the terminal just a textual output of percent complete.
>
>
>
> I was looking for a system variable that had this info but could not find one. Hopefully there is a simple solution and I'm just not seeing it.
>
>
>
> Pete
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL - OS X Mountain Lion
Next Topic: IDL path setup in MAC

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

Current Time: Wed Oct 08 15:59:05 PDT 2025

Total time taken to generate the page: 0.00483 seconds