I had previously posted about one of my oldest but still frequently used scripts which gathers all tabs from a window into a text list to be pasted in an email or something like that.
I have recently adapted that script to do something new. This new script will gather the tabs in the frontmost Safari window and create a note in the Notes app with all the links (then, presumably, you would want to clean out and close most of the tabs)
Also I learned that the Safari tabs from all your Macs and iOS devices are stored in the `~/Library/SyncedPreferences/com.apple.Safari.plist` and extended the script to read that instead of grabbing them directly from Safari:
To use it is probably easiest to enable the Script menu (in Script Editor > Preferences) and drop the scripts in the `~/Library/Scripts/Applications/Safari` folder.
Thank you very much for sharing this, it’s exactly the script I needed.
What would I need to do to adapt this script to paste into any application like Mail or OneNote as opposed to opening Notes and creating a new folder?
I’d like to use TextExpander to run the Applescript and just pull the tabs as links and paste them wherever I need.
try this script: https://scriptingosx.com/2013/01/copy-link-list-from-frontmost-safari-window/
Thanks for replying. I came across that post as well but need the formatting of the one that creates a new Notes folder.
Titles with hyperlinks instead of URL pasted below the title.
I need the same function (pasting the list) from the other post but the formatting for output of this one.
I changed the script above to pipe the html into textutil and then pbcopy. It works for me in Mail. I don’t use OneNote but it is worth a try:
https://gist.github.com/scriptingosx/52ebbb2e3d030b53556f48c90df0a5e2
Where do I paste the script please?
Also will this work with my iPhone?
Thanks
Unfortunately this script has been defunct since 10.12 🙁