Working in JScript, how would one call the file type group list to display in a custom dialog dropdown list?
I don't understand. Why would the File Type Group List (that means the Settings > File Types dialog, at least to me) be involved with your script displaying your custom dialog?
Sorry for the confusion. I want to build a dialog for a script I have based, in part, on file type groups, with each file type group hard-coded in the script. Rather than hard code each file type group, I want to reference the user's current file type group list, knowing it could vary from user to user, in a dropdown to allow the user to input a specified file type group for the script to use in its function.
Hope this makes sense.
You'll find them in DOpus.filetypegroups
, e.g.:
for (var e = new Enumerator(DOpus.filetypegroups); !e.atEnd(); e.moveNext()) {
var item = e.item();
DOpus.Output(item);
}
https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Scripting/filetypegroups.htm
Thanks. This will help!
EDIT: DOpus.Output gives me the standard names, as expected. Unfortunately, a user added file type group I added called Databases returns this:
{4AA82CEC-2CBC-4BF7-A891-62956162E02E}
How could I get the actual name?
That's the display_name
.
for (var e = new Enumerator(DOpus.filetypegroups); !e.atEnd(); e.moveNext()) {
var item = e.item();
DOpus.Output(item);
DOpus.Output(item.display_name);
}
https://www.gpsoft.com.au/help/opus12/index.html#!Documents/Scripting/filetypegroup.htm