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

Home » Public Forums » archive » Re: check envi status
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: check envi status [message #67062 is a reply to message #67057] Wed, 24 June 2009 07:33 Go to previous message
KRDean is currently offline  KRDean
Messages: 69
Registered: July 2006
Member
On Jun 24, 2:45 am, chris <rog...@googlemail.com> wrote:
> Hi,
> how can someone check within IDL whether envi is installed and is
> running in the background? I can't find any information on that. Can
> somebody help?
>
> Best regards
>
> CR

Simple enough. Use CATCH. If ENVI is NOT install, the CATCH will
"catch" the error.

;+
;
; @examples
; <PRE>
; IDL> PRINT, ' ENVI is ', ( Simple_ENVI_On() ) ? 'Available' : 'Not
Available'
; </PRE>
;
;----------------------------------------------------------- ------------
FUNCTION Simple_ENVI_ON

CATCH, ERROR_STATUS
IF Error_status NE 0 THEN BEGIN
PRINT, 'Error index: ', Error_status
PRINT, 'Error message: ', !ERROR_STATE.MSG
CATCH, /CANCEL
RETURN, 0
ENDIF

ENVI, /Restore_Base_Save_Files

RETURN, 1
END

Kelly Dean
Fort Collins, Colorado
[Message index]
 
Read Message
Read Message
Previous Topic: IDL Help on Mac OS
Next Topic: IDL 7.1.1 Workbench update for Macintosh OS X

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

Current Time: Sat Oct 11 02:34:41 PDT 2025

Total time taken to generate the page: 1.12192 seconds