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

Home » Public Forums » archive » Re: Another user input question
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: Another user input question [message #67347] Wed, 15 July 2009 11:40
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Joanna writes:

> I'm writing a program where I want the user to input which file they
> want to be read into the program. I previously had a specific file in
> the program using rdfloat, where I knew how many columns there were,
> etc. Now I want my program to be more universal, but I'm having
> trouble figuring out how to allow the user to pick the file. I've
> tried things like this:
>
> data=' '
> read,'Enter file',x
> data=rd_tfile( or other such functions), 'data'... and so on and so
> forth...
> print,data
>
> I just keep getting various types of error messages. Any ideas?

Try this:

file = Dialog_Pickfile()
IF file EQ "" THEN RETURN

There are various keywords you can use with DIALOG_PICKFILE
to refine your search. Learn about them by typing this:

IDL> ? dialog_pickfile

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Previous Topic: Another user input question
Next Topic: Plot3 IDL

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

Current Time: Fri Oct 10 06:58:19 PDT 2025

Total time taken to generate the page: 0.80271 seconds