I'm looking to automate a workflow where the "Save Image" preference inside Global Info is modified via a script. Specifically, I want to change the setting to "Ignore the annotation(s)" before saving an image. I searched through the documentation but couldn't find any commands or API references related to modifying this setting.
What I've Tried / Context:
Questions:
Any guidance or insights would be greatly appreciated. Thanks in advance!
As you have discovered, there is no officially supported script interface to these Save Image preference parameters. However, there are undocumented global tags that store their current values. One can access and change these global tags, but whether such changes will actually produce the desired result depends on the version of GMS and details of how your script is written and executed. So consider the following example as something to try, but please note that it may not quite work as you wish in your particular context.
TagGroup globalTagGroup = GetPersistentTagGroup();
String tagPath = "Private:Save Image:Burn Annotation Option";
Number burnAnnotationOption;
globalTagGroup.TagGroupGetTagAsNumber(tagPath, burnAnnotationOption);
OKDialog("Current burn annotation option for Save Image: " + burnAnnotationOption);
Number ignoreAnnotationOption = 0;
globalTagGroup.TagGroupSetTagAsNumber(tagPath, ignoreAnnotationOption);
Note that this global tag is under the "Private" heading. Generally, it is safe enough to read such tags to get at the current settings of internal DM parameters, but changing such parameters by setting the associated tag is not supported and does not always work as one would like.