Jump to content

How can I combine two workflows that already exist?


Recommended Posts

This will be way easier in Alfred v3, where you can combine as many scripts as you want. 

Either way you wait, or post both your scripts that you use so that me or someone else can combine them :)

Cannot help you if we don't have the workflows :P

Link to comment

I combined the workflows now. It still shows the file in the path, idk if you still want that but i kept it for now.

Here you go:

New Google Images search https://www.dropbox.com/s/bcthmdcc8up9h6q/Google%20Similar%20Images.alfredworkflow?dl=0

 

New Reveal Desktop Wallpaper: https://www.dropbox.com/s/to94y431a48tvnc/Reveal%20Desktop%20Wallpaper.alfredworkflow?dl=0

 

You can check the workflows. I used the external trigger to pass an argument to the google search from the RDW.

In Alfred v3 you'll be able to just copy all into the workflow and combine it. Or use the old way ^^

 

Other things i did were adding lines like "set thePicture to POSIX path of thePicture as string"

to change the path to ".../.../..../" instead of being "...:...:...:" so that the google search can use it.

I also added the line "filepath = filepath.rstrip()" to the "url_for_image.py" python script to strip out

any "return" that has been added to the path.

 

I tested it and it works  :) hope the way you expect, else let me know  :)

Edited by FroZen_X
Link to comment

Thanks for trying, but it doesn't seem to work. It just opens up a workflow folder in Finder...

 

Also, shouldn't it just be one workflow once it's combined? I was imagining something where I put in the keyword and it just takes me to the google images page for whatever my wallpaper is at the moment.

Link to comment

Delete the old workflows and then install the new ones to make sure nothing is going wrong. I tested it once again and it does work oO

And you can use the keyword "rdw" to google search for your desktop picture. That's what you wanted right?

 

You can combine everything together, but i was using deanishes workflow thats already there as its the easiest way.

Just had to add one line of code to his and had to call it via external trigger :)

 

Like i said you can wait for alfred v3 where you can just copy pasta everything in and there you go. Its way easier.

And yes i have tested in v3 already and there it is easier.

 

To remove the file opening you simply have to remove these lines:

    reveal thePicture
    activate

in your RDW workflow.

 

Then it looks like this:

tell application "System Events"
set posix_path to (pictures folder of current desktop)
set picPath to (POSIX file posix_path) as string
end tell
tell application "System Events"
tell current desktop
  if picture rotation = 0 then
   tell application "System Events"
    set posix_path to (picture of current desktop)
	set thePicture to (POSIX file posix_path) as string
   end tell
   tell application "Finder"
	set thePicture to POSIX path of thePicture as string
	return thePicture
   end tell
  else
   set thePictures to (do shell script "sqlite3 ~/Library/Application\\ Support/Dock/desktoppicture.db \"SELECT * FROM data\" | sed -n '$p'")
   set fullPath to picPath as string
   set rotationImage to fullPath & thePictures
   tell application "Path Finder"
	set rotationImage to POSIX path of rotationImage
	return rotationImage
   end tell
  end if
end tell
end tell


I changed the links in my post before, but here they are again:

 

Reveal: https://www.dropbox.com/s/to94y431a48tvnc/Reveal%20Desktop%20Wallpaper.alfredworkflow?dl=0

 

Google search: https://www.dropbox.com/s/bcthmdcc8up9h6q/Google%20Similar%20Images.alfredworkflow?dl=0

 

I changed the names and therefore they didnt get replaced by you. Therefore you had the problems i guess. These should replace 

the old ones now, but better you double check :)

Edited by FroZen_X
Link to comment

Thanks for all the effort, but it still doesn't work for me. When I enter 'rdw' into Alfred now it opens two Finder tabs, one which goes to the desktop background image as it did before, and one that appears to go to the google images workflow wherever it lives in Finder.

Link to comment

Thanks for all the effort, but it still doesn't work for me. When I enter 'rdw' into Alfred now it opens two Finder tabs, one which goes to the desktop background image as it did before, and one that appears to go to the google images workflow wherever it lives in Finder.

 

 

Go to your workflows and search for "rdw" and delete the workflows you find(those you want to use for Reveal Desktop stuff).

Should look like this after:

 

n3847k.png

 

Then search for "google similar" and delete the workflow from deanishe. All doubles of them like with the rdw.

Should look like this after:

 

30mbklh.png

 

Then download the workflows again fresh from here:

 

Reveal: https://www.dropbox....edworkflow?dl=0

 

Google search: https://www.dropbox....edworkflow?dl=0

 

Make sure that you don't install any old version!

 

Import them and type "rdw" into alfred's window and hit enter. A notification should appear "Searching for similar...".

Then you have to wait a moment as your background picture is getting uploaded. Depending of your internet speed this will be quick or yeah slow.

After these steps it should work and if it still doesnt then i can offer you to fix whats going on over TeamViewer.

You can check it out here: https://www.teamviewer.com/

 

I've been using it since years to help other people :)

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