Action

Search Images by Prompt

Posted by superagent_g, Last update over 6 years ago

Use Google, Yandex and Yahoo to search for images. Type your query into Drafts, select this action and at the prompt choose your preferred search engine.

Steps

  • prompt

    promptKey
    prompt
    promptTitle
    Search for images with…
    promptMessage
    promptButtons
    Google|Yandex|Yahoo
    includeTextField
    false
    textFieldDefault
    includeCancelButton
    true
  • script

    // Script steps run short Javascripts
    // For documentation and examples, visit:
    // http://help.agiletortoise.com
    
    var choice = String(draft.getTemplateTag("prompt_button")), fullUrl = "", term = escape(String(draft.content));
    
    switch (choice) {
    
     case "Google":
        fullUrl= "https://www.google.com/search?tbm=isch&q=" + term;
        break;
    
    case "Yandex":
        fullUrl= "https://www.yandex.com/images/touch/search?text=" + term;
        break;
    
      case "Yahoo":
        fullUrl= "https://images.search.yahoo.com/images/search?q="  + term;
        break;
    
    
    }
    
    draft.setTemplateTag("full_url", fullUrl);
  • url

    template
    [[full_url]]
    useSafari
    false
    encodeTags
    false

Options

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