Is there any reason why a FAYT script is always called at least 2 times? And one of them is always when the FAYT field is closing.
I understand that it is a minor detail since you can always check if any value has been entered in the field or not, but I find it a bit curious and I wanted to bring it to your attention.
// FAYT_test
function OnInit(initData) {
initData.name = "FAYT_test";
initData.version = "1.0";
initData.desc = "FAYT test";
initData.default_enable = true;
initData.min_version = "13.0";
}
// Called to add commands to Opus
function OnAddCommands(addCmdData) {
var cmd = addCmdData.AddCommand();
cmd.name = "fayt_test";
cmd.method = "Onfayt_test";
cmd.label = "fayt_test";
cmd.hide = true;
var fayt = cmd.fayt;
fayt.enable = true;
fayt.key = '%';
fayt.backcolor = '#ffad5b';
fayt.textcolor = '#000000';
fayt.label = "fayt_test";
fayt.realtime = true;
}
// Implement the fayt_test command
function Onfayt_test(scriptFAYTData) {
DOpus.Output('fayt : "' + scriptFAYTData.fayt + '"');
if (scriptFAYTData.fayt != "fayt_test") return;
DOpus.Output('cmdline : "' + scriptFAYTData.cmdline + '"');
DOpus.Output('suggest : ' + scriptFAYTData.suggest);
if (scriptFAYTData.suggest)
scriptFAYTData.tab.UpdateFAYTSuggestions(DOpus.Create.Vector('abc', 'bcd', 'cde', 'def', 'efg', 'ghi', 'hij', 'ijk', 'jkl', 'klm', 'lmn'));
//if (scriptFAYTData.cmdline === '' || scriptFAYTData.quickey === scriptFAYTData.cmdline) return;
return;
}
FAYT_test.opusscriptinstall (892 Bytes)
Thanks!