That script won't quite work, Patrick. It will put the date on one line and 
the todo_text on another. Instead, replace the two *do shell script* lines 
with this one:

*do shell script* "echo $(date) " & quoted form of todo_text & " >> " & 
posixPath

If you want to customize the date string, Sam, you should check out the man 
page for date in Terminal.

On Tuesday, March 17, 2015 at 2:12:28 AM UTC-6, Patrick wrote:
>
> Your best bet is probably to create an AppleScript action that does this. 
> If you wanted to just type your TODO into Quicksilver, that would be the 
> easiest way.
> Getting the current selection would be slightly more difficult, but 
> doable. Here’s an example script:
>
> See http://qsapp.com/wiki/AppleScripts for more info
>
> *using terms from* *application* "Quicksilver"
> *on* *process text* todo_text with todofile
> *set* posixPath *to* (*the* POSIX path *of* todofile)
> *do shell script* "date >> " & posixPath
> *do shell script* "echo \"" & todo_text & "\" >> " & posixPath
> *end* *process text*
>
>
> *on* *get argument count*
> (* Use "return 1" (or omit this entire handler) to never show the third 
> pane. 
>     Use "return 2" to force the third pane to show. 
>     Use "return 3" to make the third pane optional. *)
> *return* 2
> *end* *get argument count*
>
>
> --This handler may be omitted if the action accepts all direct object 
> types.
> *on* *get direct types*
> *return* {"NSStringPboardType"}
> *end* *get direct types*
>
>
> --This handler may be omitted if the action accepts all indirect object 
> types.
> *on* *get indirect types*
> *return* {"NSFilenamesPboardType"}
> *end* *get indirect types*
>
>
> *end* *using terms from*
>
>
>
> I prefer to use encrypted email. You can find my public key here 
> <http://patjack.uk/pk.asc>.
> Learn how to encrypt your email with the Email Self Defense Guide 
> <https://emailselfdefense.fsf.org/en/>
>  
> On 16 Mawrth 2015, at 21:32, Sam <[email protected]> wrote:
>
>
> Hi,
> I have a custom trigger that allow me to automatically add a selected text 
> to a file: Current Selection / Append To / todo.txt
>
> ...

-- 
You received this message because you are subscribed to the Google Groups 
"Quicksilver" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/blacktree-quicksilver.
For more options, visit https://groups.google.com/d/optout.

Reply via email to