[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wait for an available license?



Nando Iavarone wrote:
> I need a mechanism to automatically exit from IDL,
> and not enter in demo mode, if the license is unavailable.
> I don't want the message: 'do you want to wait for...... (y/n)?'.

The following function may help:

;---cut here---
FUNCTION CHECK_DEMO_MODE

;- Check for demo mode consistently in IDL versions 5.0, 5.1, 5.2
;- Returns TRUE if IDL is running in demo mode.

if float(!version.release) lt 5.1 then begin
  return, demo_mode()
endif else begin
  return, lmgr(/demo)
endelse

END   
;---cut here---

Then all you need in your starup file is

if check_demo_mode() then exit

Cheers,
Liam.

-- 
Liam E. Gumley
Space Science and Engineering Center, UW-Madison
http://cimss.ssec.wisc.edu/~gumley