O$: Omnis 'appflags' used in FILEOPS for things like $getFileName - any insight for multiple file types

Andrew Clow andrew at freedomsoftware.co.nz
Sun Jan 11 16:57:25 EST 2015


Separate the extension masks with a semi-colon.
Eg: Pictures|*.jpg;*.jpeg;*.gif;*.png|

Multiple groups: 'Pictures|*.jpg;*.jpeg;*.gif;*.png|Spreadsheets|*.xls;*.xlsx;*.sxc;*.stc|Documents|*.doc;*.docx;*.rtf;*.txt|'
Works on Windows, untested on OSX

Regards,
Andrew Clow
Freedom Software Ltd.


-----Original Message-----
From: omnisdev-en-bounces at lists.omnis-dev.com [mailto:omnisdev-en-bounces at lists.omnis-dev.com] On Behalf Of Doug Easterbrook
Sent: Saturday, 10 January 2015 09:41
To: OmnisDev List - English
Subject: O$: Omnis 'appflags' used in FILEOPS for things like $getFileName - any insight for multiple file types


hi all.

I’ve searched omnis docs and google for this (honourable mention to kelly for an answer long ago) to try to figure out how to put multiple items in the ‘appflags’ parameter in the fileops functions that accept it.


for example, I know this will let me open files

Do FileOps.$getFileName(pathName,FilePrompt,appflags,LocalPath)

if appflags is

Rich Text Format (*.rtf)|*.rtf|   —— that will let me open only files that have an rtf extension

or I can make it allow multiple files, selectable by name by using the following.  The user will be required to pick the file type, then the dialog will limit only rtf or txt to be selected.

Rich Text Format (*.rtf)|*.rtf|Text Only (*.txt)|*.txt|


so, I’d like to do something more complicated.  I’d like to allow pictures.    those can have various suffixes, so I’d like to have a line that says

Pictures|*.jpg,*.jpeg,*.png,*.gif|

meaning — allow it is its any of those file types.   At this time, all I can seem to do is allow specifics as in

jpeg|*.jpg|other jpeg|*.jpeg|PNG|*.png|gif|*.gif|

meaning I’ll have 4 lines on my file dialog that allow file selection    …   I’d really only like one, if that is possible



has anybody run into this before???  and have a solution??


Doug Easterbrook
Arts Management Systems Ltd.
mailto:doug at artsman.com
http://www.artsman.com
Phone (403) 536-1205    Fax (403) 536-1210



More information about the omnisdev-en mailing list