Answer file with multiple types [SOLVED]
Posted: Tue Dec 07, 2021 12:05 pm
Hi all,
This really should be straightforward but i can't get it to work. Using answer file with type(s) to open a tab-separated values file is causing a slight headache, because some of these have the extension .txt and some .tab.
according to the documentation on "answer file with type" this is possible and as it states:
However when trying to allow selection of both, the following code doesn't work:
the files with extension .txt are selectable, but files with extension .tab are greyed out.
As i read the documentation, it should be possible to select both...
What am i doing wrong?
Many thanks
Stam
This really should be straightforward but i can't get it to work. Using answer file with type(s) to open a tab-separated values file is causing a slight headache, because some of these have the extension .txt and some .tab.
according to the documentation on "answer file with type" this is possible and as it states:
i presume 'filetypes' refers to the old macOS filetype 4 character code which doesn't exist anymore and multiple examples i was able to find online leave this blank. Using this format with just 1 filetype (either "tab files|tab" or "text files|txt") works fine.Each set of types is a return-delimited list of values of the form "tag|extensions|filetypes".
However when trying to allow selection of both, the following code doesn't work:
Code: Select all
put "text files|txt|" & return & "TAB files|tab|" into tTypes
answer file "Select a TSV file to import..." with type tTypes
As i read the documentation, it should be possible to select both...
What am i doing wrong?
Many thanks
Stam