jore Posted November 15, 2022 Share Posted November 15, 2022 Hi everyone! Yesterday I made this workflow looking forward to mimic the TabCopy (http://tabcopy.com) extension from Chrome in Safari using Alfred; the workflow puts the link from Safari's active tab in the clipboard and pastes at cursor as text, and it works great! The thing is I cannot figure out how to copy all the tabs at the same time. I would think that maybe using some recursive/iterative magic could do the job or maybe there is a function that does this easier/faster. Here is the working workflow to copy 1 active tab: on alfred_script(q) tell application "Safari" set theName to name of front document set theUrl to URL of front document return theName & ": " & theUrl end tell end alfred_script And I also attached a screenshot of the workflow objects. Thanks in advance! Link to comment
vitor Posted November 15, 2022 Share Posted November 15, 2022 Check the Automation Tasks, specifically in the Extras, and you’ll find Tasks for this. Link to comment
jore Posted November 15, 2022 Author Share Posted November 15, 2022 That looks great, I didn't knew the new stuff in Alfred 5! It works great, but I'm lacking one thing from the AppleScript: not being able to change the Output format cause the Automation is limited to 4 options: - Title - URL - Title 'TAB' URL - URL 'TAB' Title In the AppleScript I can use whatever I want… I have been using Title: URL or using the Markdown syntax [Title](URL) Maybe using some of the Utilities (I tried the Join Args), but I'm not being able to do it neither. Link to comment
vitor Posted November 15, 2022 Share Posted November 15, 2022 1 minute ago, jore said: Maybe using some of the Utilities Precisely. Specifically, the Replace Utility. The separator is a tab precisely to make that easy: Replace regex (.*)\t(.*) with [$1]($2) and you get Markdown links. Link to comment
jore Posted November 15, 2022 Author Share Posted November 15, 2022 That's awesome, now it works! Appreciated vitor 🙏 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now