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

Home » Public Forums » archive » Re: path to .sav file
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: path to .sav file [message #50938 is a reply to message #50934] Mon, 23 October 2006 03:55 Go to previous message
Allan Whiteford is currently offline  Allan Whiteford
Messages: 117
Registered: June 2006
Senior Member
greg michael wrote:
> I'm sure there must be any easy answer to this, but I can't figure it
> out...
>
> If a VM program is run with something like:
>
> idl -vm=...path.../myprog.sav
>
> how can I get that path from within the program?
>
> Greg
>

Greg,

It's not pretty but:

help,/source,output=a
idx=where(stregex(a,'myprog +([/,a-z,0-9,_,\.]*)',/fold_case) eq 0)
file=(stregex(a[idx],'myprog +([/,a-z,0-9,_,\.]*)',$
/fold_case,/subexpr,/extract))[1]

I'm sure there is a better way.

Thanks,

Allan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Retrieving the title of a widget_base after the fact.
Next Topic: sorting string arrays - non alphabetic and user defined order

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

Current Time: Fri Oct 10 08:21:50 PDT 2025

Total time taken to generate the page: 1.04050 seconds