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

Home » Public Forums » archive » idl_startup.pro
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
idl_startup.pro [message #49826] Thu, 17 August 2006 12:10 Go to next message
Dominic Metzger is currently offline  Dominic Metzger
Messages: 30
Registered: August 2006
Member
Hi,

Is there something like idl_startup.pro when IDL quits? Something like
a idl_finishup.pro that gets called when IDL quits? Or is there a way
to achieve this somehow.

thanks,

dometz
Re: idl_startup.pro [message #49857 is a reply to message #49826] Tue, 22 August 2006 08:04 Go to previous messageGo to next message
abraham is currently offline  abraham
Messages: 7
Registered: May 1995
Junior Member
If you don't mind writing a DLM, you can call IDL_ExitRegister to wire
up a custom exit routine. You pass in the address of your routine, and
it gets pushed onto a stack of routines that are called during exit.
The DLM can have a single routine, such as RegExitRoutine, that you
could call from your startup.pro to wire things up.

I have a sample Visual Studio project that I could send you, if you are
interested.

Cheer,
Abraham
abraham@ittvis.com


Dominic Metzger wrote:
> Hi,
>
> Is there something like idl_startup.pro when IDL quits? Something like
> a idl_finishup.pro that gets called when IDL quits? Or is there a way
> to achieve this somehow.
>
> thanks,
>
> dometz
Re: idl_startup.pro [message #49860 is a reply to message #49826] Tue, 22 August 2006 01:45 Go to previous messageGo to next message
Foldy Lajos is currently offline  Foldy Lajos
Messages: 268
Registered: October 2001
Senior Member
On Tue, 22 Aug 2006, m_schellens@hotmail.com wrote:

> For a log time I used EXIT as well.
> But then I switched to the much faster Control-D
> Maybe not everybody knows about this.
> At least under linux it is working.
> Don't know about windows.
> (This does not help the OP of course)
>
> Cheers,
> Marc
>

Ctrl-D is EOT (end of transmission) in ASCII and on terminals. On windoz
one can use the usual Alt-F4 key.

regards,
lajos
Re: idl_startup.pro [message #49861 is a reply to message #49826] Tue, 22 August 2006 00:22 Go to previous messageGo to next message
marc schellens[1] is currently offline  marc schellens[1]
Messages: 183
Registered: January 2000
Senior Member
liamgumley@gmail.com wrote:
> Dominic Metzger wrote:
>> Hi,
>>
>> Is there something like idl_startup.pro when IDL quits? Something like
>> a idl_finishup.pro that gets called when IDL quits? Or is there a way
>> to achieve this somehow.
>>
>> thanks,
>>
>> dometz
>
> If you can train yourself to type 'quit' instead of 'exit' at the end
> of the IDL session, then just put a file named 'quit.pro' in your IDL
> path:
>
> PRO QUIT
> print, 'Hello world'
> exit
> END
>
> Replace the 'print' with the commands you want executed prior to
> leaving IDL.
>
> Cheers,
> Liam.
> Practical IDL Programming
> http://www.gumley.com/

For a log time I used EXIT as well.
But then I switched to the much faster Control-D
Maybe not everybody knows about this.
At least under linux it is working.
Don't know about windows.
(This does not help the OP of course)

Cheers,
Marc
Re: idl_startup.pro [message #49862 is a reply to message #49826] Mon, 21 August 2006 16:16 Go to previous messageGo to next message
news.qwest.net is currently offline  news.qwest.net
Messages: 137
Registered: September 2005
Senior Member
> Dominic Metzger wrote:
> Hi,
>
> Is there something like idl_startup.pro when IDL quits? Something like
> a idl_finishup.pro that gets called when IDL quits? Or is there a way
> to achieve this somehow.
>
> thanks,
>
> dometz

Perhaps you start up IDL from a batch file, which calls IDL
and waits, and when IDL quits, will then execute other
commands.
You could call another IDL session and run a script.

I don't really see how to execute IDL commands at exit
in the same session however.

Cheers,
bob
Re: idl_startup.pro [message #49863 is a reply to message #49826] Mon, 21 August 2006 13:48 Go to previous messageGo to next message
liamgumley is currently offline  liamgumley
Messages: 74
Registered: June 2005
Member
Dominic Metzger wrote:
> Hi,
>
> Is there something like idl_startup.pro when IDL quits? Something like
> a idl_finishup.pro that gets called when IDL quits? Or is there a way
> to achieve this somehow.
>
> thanks,
>
> dometz

If you can train yourself to type 'quit' instead of 'exit' at the end
of the IDL session, then just put a file named 'quit.pro' in your IDL
path:

PRO QUIT
print, 'Hello world'
exit
END

Replace the 'print' with the commands you want executed prior to
leaving IDL.

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
Re: idl_startup.pro [message #49985 is a reply to message #49826] Wed, 23 August 2006 08:57 Go to previous message
Paolo Grigis is currently offline  Paolo Grigis
Messages: 171
Registered: December 2003
Senior Member
Maybe you are underestimating how often it is likely
to end the IDL session with something like:

% Compiled module: XMANAGER.
IDL> Segmentation fault

or

IDL> Xlib: unexpected async reply (sequence 0x1150)!
[wait forever]
[CTRL Z]
[1] + 5521 Suspended idl
/home/pgrigis> kill %1

:-) (-:

Ciao,
Paolo


Dominic Metzger wrote:
> Hi,
>
> Is there something like idl_startup.pro when IDL quits? Something like
> a idl_finishup.pro that gets called when IDL quits? Or is there a way
> to achieve this somehow.
>
> thanks,
>
> dometz
>
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: reduce the size of eps
Next Topic: IDL scale property

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

Current Time: Wed Oct 08 15:16:24 PDT 2025

Total time taken to generate the page: 0.00650 seconds