uigetfile for Windows

View: New views
2 Messages — Rating Filter:   Alert me  

uigetfile for Windows

by Knuhut :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I needed uigetfile (usally known from Matlab) to open arbitrary files in my application. AFAIK there is no function like that in Octave, so I made one of my own.

My function works by calling a separate binary exe via 'system' function, which itself calls the Windows API function 'GetOpenFileName'. Sources and the VC6 project are included in the attachment.

I'm far away from being a sophisticated programmer and my function is not fully compatible with Matlab. Anyway it works for me and someone of you might find it useful.

Ragards
Knut

getfilename.zip

Re: uigetfile for Windows

by Knuhut :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Here is an extended version that has two additional parameters similar to matlab.

Usage:
filename=uigetfile(FilterSpec, DialogTitle, DefaultName)

You can type "help uigetfile" to get more information

uigetfile.zip.

Regards
Knut

Knuhut wrote:
Hi

I needed uigetfile (usally known from Matlab) to open arbitrary files in my application. AFAIK there is no function like that in Octave, so I made one of my own.

My function works by calling a separate binary exe via 'system' function, which itself calls the Windows API function 'GetOpenFileName'. Sources and the VC6 project are included in the attachment.

I'm far away from being a sophisticated programmer and my function is not fully compatible with Matlab. Anyway it works for me and someone of you might find it useful.

Ragards
Knut

getfilename.zip