Page 1 of 1

Selecting an image file

Posted: Thu Jun 06, 2013 12:39 pm
by exheusden
I want to allow the selection of either a jpg or a png image file. I use the following code:

answer file "Choose original label image:" with type "Image files|jpg|JPEG|png|PNG|"

(I've tried it with and without the final vertical bar), but only jpg documents are selectable in the resulting file list, png files being greyed out.

How can I make the pngs selectable, too?

Re: Selecting an image file

Posted: Thu Jun 06, 2013 12:48 pm
by Klaus
Hi exheusden,

do this:
...
answer file "Choose original label image:" with type "Image files|jpg,png|JPEG,PNGf"
...
:-)

With "itemdel = |" the second ITEM is a COMMA separated list of FILE suffixes you want to allow.
The last item is only neccessary for older machines, since Apple will go away from FILETYPES like
in the old days, but will use file suffixes today.


Best

Klaus

Re: Selecting an image file

Posted: Thu Jun 06, 2013 1:16 pm
by exheusden
Thank you very much, Klaus. It now works!