Jump to content

Downie Download Workflow


Recommended Posts

Hi All

 

I'm just getting into Alfred workflows and exploring areas of my day-to-day processes that can be streamlined with workflows.

 

Here's my first release of a workflow for speeding up sending links from the current tab in Google Chrome to Downie (video download app).

 

The workflow can be downloaded here:

https://github.com/floq-design/alfred-workflows/raw/master/downie-download/downie-download.alfredworkflow

 

Hope you find it useful.

 

Cheers

James

Link to comment
  • 3 years later...
  • 5 years later...

@vitor can you help to modify this workflow to work with Safari? I tried changing the code but it's not working. I know that Downie has a Safari Extension but I don't want to clutter the toolbar with various icons. Thank you in advance! 

Link to comment

@danillo Open the Run Script and change

 

tell application "Google Chrome"
	set myurl to URL of active tab of first window
	set the clipboard to myurl
end tell

 

to

 

tell application "Safari"
	set myurl to URL of current tab of first window
	set the clipboard to myurl
end tell

 

If @James Hobson is interested in supporting multiple browsers concurrently, I’ve made a post on how.

Link to comment
On 7/5/2022 at 2:10 PM, vitor said:

@danillo Open the Run Script and change

 

tell application "Google Chrome"
	set myurl to URL of active tab of first window
	set the clipboard to myurl
end tell

 

to

 

tell application "Safari"
	set myurl to URL of current tab of first window
	set the clipboard to myurl
end tell

 

If @James Hobson is interested in supporting multiple browsers concurrently, I’ve made a post on how.

 

It was the first thing I tried here. I don't know why, but it didn't work. I tried using Webkit instead of Safari but it didn't work too.

Link to comment
Just now, Danilo said:

It was the first thing I tried here. I don't know why, but it didn't work.

 

Are you sure that’s the change you made? active tab has to change to current tab, it’s not just the browser’s name.

Link to comment
Posted (edited)
1 hour ago, vitor said:

 

Are you sure that’s the change you made? active tab has to change to current tab, it’s not just the browser’s name.

 

Yep, here's the current code:

 

on workflow()
	
	--display dialog "workflow()"
	
	tell application "Safari"
		set myurl to URL of current tab of first window
		set the clipboard to myurl
	end tell
	
	--display dialog myurl
	
	tell application "Downie" to activate
	
	tell application "System Events" to tell application process "Downie"
		click menu item "Open URLs..." of menu "File" of menu bar item "File" of menu bar 1
		click menu item "Paste" of menu "Edit" of menu bar item "Edit" of menu bar 1
		key code 76 using {command down}
	end tell
	
end workflow

on init(appName)
	
	if appIsRunning(appName) then
		--display dialog "running"
		workflow()
	else
		--display dialog "starting"
		set appNameAsText to appName as text
		tell application appNameAsText to activate
		delay 0.1
		init(appName)
	end if
	
end init

on appIsRunning(appName)
	
	tell application "System Events" to (name of processes) contains appName
	
end appIsRunning

init("Downie")

 

Edited by Danilo
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...