Jump to content

Help making a Workflow that switches apps and pastes text

Recommended Posts

Is it possible to create a workflow in Alfred that does the following?  

- Copy selected text to clipboard

- Switch to last used app

- Paste text from clipboard

- Switch back to the first app


This is an action I've realised I do lots of times a day. If it isn't possible, and I suspect it isn't in Alfred, has anyone come across a different app that can do this?

Many thanks.

Edited by vitor
Moved title to post content
Link to comment
  • vitor changed the title to Help making a Workflow that switches apps and pastes text

When making a post, please always make a descriptive title.

What you wish to accomplish can be boiled down to a series of keyboard shortcuts: ⌘C, ⌘⇥, ⌘V, ⌘⇥. While it’d be better do to it programatically, I’m not certain if Apple gives us easy access to the order of open apps. If you always do this operation with the same two apps, then that’d be helpful information and we could do something better.

Otherwise, check Hotkey Triggers to start the Workflow with the selection, the Dispatch Key Combo Output to press the keys, the Delay Utility so things don’t fire too quickly (an unfortunate effect of GUI scripting) and the Copy to Clipboard Output to paste.

It’ll also work if you just chain a bunch of Dispatch Key Combo Output and Delay Utility, though.

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...