Jump to content

Help making a workflow to paste text into new TextEdit doc


Recommended Posts

Hello,

 

I need help learning how to make the following simple workflow. I would like it to do this:

 

Paste selected text without style into a new TextEdit document.

 

I have made workflows before but only for opening files, apps, and URLs - never anything more complex than that. I don't know how to do Apple Scripts and such. Just so you know to dumb it down a little for me. :)

 

Thank you so much!

Link to comment

Hello,

 

I need help learning how to make the following simple workflow. I would like it to do this:

 

Paste selected text without style into a new TextEdit document.

 

I have made workflows before but only for opening files, apps, and URLs - never anything more complex than that. I don't know how to do Apple Scripts and such. Just so you know to dumb it down a little for me. :)

 

Thank you so much!

 

The easiest way to do this is to create a new workflow, with a hotkey trigger. With the hotkey trigger, set the hotkey and set the argument property to be "Selection is OS X". Save that and move on. Next, add a Run Script action. Set the language to osascript, uncheck the escaping options. You probably wouldn't need them. Then in the code area enter..

tell application "TextEdit"
    activate
    make new document with properties {text:"{query}"}
end tell

Connect the hotkey and the action, and test it out.

Link to comment

The easiest way to do this is to create a new workflow, with a hotkey trigger. With the hotkey trigger, set the hotkey and set the argument property to be "Selection is OS X". Save that and move on. Next, add a Run Script action. Set the language to osascript, uncheck the escaping options. You probably wouldn't need them. Then in the code area enter..

tell application "TextEdit"
    activate
    make new document with properties {text:"{query}"}
end tell

Connect the hotkey and the action, and test it out.

 

Hi David,

Thank you so much for helping me.

I did what you said but it doesn't seem to be working. Maybe I should clarify what I'm hoping to do.

 

I want to select text anywhere, like in Safari or Pages or anywhere, and then have the hotkey open a new TextEdit document and paste the selected text into the new document using Paste and Match Style.

 

When I did what you said, nothing happened.

Here is what I have:

 

Screen-Shot-2014-08-15-at-11.07.51-AM.pn

 

Screen-Shot-2014-08-15-at-11.07.58-AM.pn

 

Screen-Shot-2014-08-15-at-11.08.07-AM.pn

Link to comment

Hi David,

Thank you so much for helping me.

I did what you said but it doesn't seem to be working. Maybe I should clarify what I'm hoping to do.

 

I want to select text anywhere, like in Safari or Pages or anywhere, and then have the hotkey open a new TextEdit document and paste the selected text into the new document using Paste and Match Style.

 

When I did what you said, nothing happened.

Here is what I have:

 

Screen-Shot-2014-08-15-at-11.07.51-AM.pn

 

Screen-Shot-2014-08-15-at-11.07.58-AM.pn

 

Screen-Shot-2014-08-15-at-11.08.07-AM.pn

 

Actually, in the escaping, tick the option to escape double quotes. Was the text you tested this with.. did it have any double quotes in it? This works just as you described in my testing.

Link to comment

Actually, in the escaping, tick the option to escape double quotes. Was the text you tested this with.. did it have any double quotes in it? This works just as you described in my testing.

Thank you so much! It worked!

 

My only last question is: is there a way to paste as Paste and Match Style (shift-opt-cmd-v) instead of just regular Paste? That is my goal for this workflow.

I really appreciate your help!

Link to comment
  • 2 weeks later...
  • 5 years later...

Can you kindly edit your workflow, such that I can just highlight the text & instead of pressing cmd + c to copy & then the shortcut key to copy to TextEdit file. I rather highlight the section & hit the shortcut key to append to the TextEdit document.

 

Something similar to workflow of 

 

 

The only drawback of the workflow is it copies only text not the images of the selected section.

 

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