0

The DuckDuckGo Privacy Essentials browser extension opens this window when clicked:

enter image description here

I want to programmatically click the Generate Private Duck Address-button. Can this be done? I probably first need to click the extension icon in the browser's menu bar? Clicking the Generate… button inserts a new Duck-address in the clipboard, where it is easy to access it.

Context: I am scripting a browser (probably Chrome) using AppleScript and need to generate Duck-addresses in/for my Applescript. Applescriptable browsers have a command along the lines do Javascript which sends a Javascript that is executed by the browser. An example of how it can look:

tell application "Safari"
    do JavaScript "window.scrollTo(0, document.body.scrollHeight);" -- Jumps to the end of the page
end tell

(This example is slightly simplified)

I have googled this but mostly find results related to creating browser extensions or communicating between extension and web page.

The whole question boils down to: how do I generate a new Duck-address and insert it into the computer's clipboard? If there are other solutions than clicking the extension and then clicking this button, e.g., using DuckDuckGo's API, I am of course interested in them too.

d-b
  • 695
  • 3
  • 14
  • 43

0 Answers0