Jump to content

Safari active "tabs"


Recommended Posts

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!

Screenshot 2022-11-15 at 15.57.01.png

Screenshot 2022-11-15 at 15.57.07.png

Link to comment

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...