Action

frog 2020.01: dictate

Last update 2 months ago - Unlisted
  • select a language
  • dictate
  • append to active draft

Steps

  • script

    // See online documentation for examples
    // https://scripting.getdrafts.com/classes/editor#dictate
    // https://scripting.getdrafts.com/classes/prompt#addpicker
    
    let option_items = [ "de-DE", "en-US"];
    let dialog_l = Prompt.create();
    
    dialog_l.title = "Dictation Language";
    dialog_l.message = "Select Language:";
    dialog_l.addSelect("locale", "locale", option_items, [option_items[0]], false);
    dialog_l.addButton("select");
    var did_select = dialog_l.show();
    
    if(did_select == true)
    { 
    
      let selected_locale = dialog_l.fieldValues["locale"];
      let new_text = editor.dictate(selected_locale);
    
      draft.append(new_text);
    }

Options

  • After Success Default
    Notification Info
    Log Level Info
Items available in the Drafts Directory are uploaded by community members. Use appropriate caution reviewing downloaded items before use.