Jump to content

Adding Mac OS X selection to a text file.

Recommended Posts



I am trying to create a workflow that would append some text content I select on Google Chrome. 


Here are the steps:


I select some content on a website (no copy to the clipboard, just a selection)

I hit a keyboard shortcut 

Alfred runs a command that would add the selected text in a specific file.


I created a workflow with a "hotkey" and a "run script" actions. 







It is not working the way I want as every time I use workflow it appends the selection and the command (.i.e: "echo "{query}" >> ~User/Downloads/test.txttextselectedongooglechrome")




I guess I have missed something in the  "run script" action as I do not really understand the difference between "input as argv" and "input as query".


Thank you.

Link to comment

This is not the right forum: this post belongs in the "Workflow Help & Questions" forum.


Furthermore, you haven't followed the instructions on reporting problems. Specifically:



If you're having a problem with a workflow you're writing, post the actual, non-working workflow. Upload it somewhere (Dropbox?) and post a link.


Screenshots and code snippets are not enough.


You wouldn't expect your mechanic to diagnose your engine trouble from a couple of photos of your car, so why do you expect us to do that for your workflow?


Unless you've done something really obviously dumb, we can't help you.


Link to comment

@deanishe You are absolutely right. When I saw "Discussion and help" I thought there can't be a forum for help only for workflows. I clicked to fast. My bad.


@vitor Thank you. This is exactly what I wanted to build. I didn't know the "append to file" action existed. I tried to modify my workflow to make it exactly look like yours. For weird reasons, I had ""echo "{query}" >> ~User/Downloads/test.txt" being appended every time I hit the keyboard shortcut. Like if it was cached somewhere in the workflow. I recreated the workflow from scratch and now everything is working as I want to. :)

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