Browse the docs

Read the links of an app's window

Lists every link in a window (or under one element) with its address, in reading order, one per address.

Read the links of locator into into

Details #

Lists every element in the front window of app (or under locator) that has an address: links, and the text Mail, Notes and Safari give an address to as well. Each is {title, url, frame}. Duplicates by address are dropped, and the order is reading order: top to bottom in 24-point bands, then left to right. into receives the list.

Parameters #

ParameterTypeRequiredValuesWhat it does
apptextThe app to look in, by bundle id.
fuzzyyes / no, into.
intotext
locatorlocatorOnly the links under this element.
sampleany value

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Every link in this window, one per line, on the clipboard
Do
  1. Read the links of the front window into links
  2. Set lines to ‹…›
  3. Repeat for each link in links
  4. Append “{{ link.url }}⏎” to lines
  5. Copy “{{ lines }}” to the clipboard
Open in Switchboard to try it

Gotchas #

  • Only what the app offers to Accessibility. A web page in Safari lists its links; a page drawn on a canvas lists none.

  • A dry run skips this step unless you mark it Safe in dry run.

See also #

Read the rows of an app's list, Read or save the images of an app's window, Open URL