Jump to content

Add delay between calling Plain Clip and pasting


Recommended Posts

I use Plain Clip to clean up copied text before pasting it. Works beautifully. Made a keyboard combo and workflow to make this process even easier, but unfortunately, Plain Clip needs a fraction of a second to process the text, and in the meantime, the text is already pasted. How to add a delay between calling Plain Clip and pasting the text. See the image of the workflow below:

 

Screenshot%202016-02-02%2020.36.31.png?d

Link to comment

Adding a delay is seldom the best idea, and should only be used as a last resort. External factors can make the operation slower or faster than anticipated, and your action fail or take longer than needed. Hence, the best solution is to wait the exact amount of time needed, i.e., immediately after the action finishes.
 
Delete the Launch Apps/Files node and replace it with a Run Script one. Inside, set the language to bash, and add the following:

open -Wa 'Plain Clip'

That should do what you need.

Link to comment

I use Plain Clip to clean up copied text before pasting it. Works beautifully. Made a keyboard combo and workflow to make this process even easier, but unfortunately, Plain Clip needs a fraction of a second to process the text, and in the meantime, the text is already pasted. How to add a delay between calling Plain Clip and pasting the text. See the image of the workflow below:

 

What does the Plain Text app do? If all you're looking to do is paste as plain text, you can do that within Alfred and without a third-party :) 

 

To do this, connect your Hotkey object directly to your Copy to Clipboard object. 

 

Set the Hotkey object to:

- Action: Pass through to workflow

- Argument: OS X Clipboard contents

 

And in your Copy to Clipboard object, check the "Automatically paste to the frontmost app.

 

Alfred will take care of turning your copied text into clean plain text without having to wait for a third-party to do what you need. 

 

Cheers,

Vero

Link to comment

thanks, but no success as of yet. It does open PLain Clip, but for some reason it doesn't paste afterwards. I duplicated the original workflow that did paste (but too fast).

 

any further suggestions?

 

Adding a delay is seldom the best idea, and should only be used as a last resort. External factors can make the operation slower or faster than anticipated, and your action fail or take longer than needed. Hence, the best solution is to wait the exact amount of time needed, i.e., immediately after the action finishes.
 
Delete the Launch Apps/Files node and replace it with a Run Script one. Inside, set the language to bash, and add the following:

open -Wa 'Plain Clip'

That should do what you need.

Link to comment

Actually, just remembered something. Alfred’s Copy to Clipboard expects to be passed something, and you’re not passing it anything (neither with my suggestion nor your original attempt). Try
 

open -Wa 'Plain Clip'
pbpaste

And in Copy to Clipboard make sure you have {query} passed.

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...