Headlines, Hints & Tips

Hints & Tips

Store and Retrieve Workflow Data

J. Kevin Wolfe has written a very concise overview of how Automator passes information from action to action, and how to “trick” it into storing data for later use:

“To store references, use the Copy to Clipboard action from System Library. Place this after the results you need to store. Then to call it up, place a Run AppleScript action in the workflow with the following scriptlet before the action that needs the data from earlier in the workflow:

--Return Clipboard Contents to Data Flow 
return (the clipboard)

This takes the information stored on the clipboard and puts it back in the Data Flow.”

Comments

9 Comments »

  1. My blog updated the month. You’ll now find the entry here:

    http://homepage.mac.com/jkevinwolfe/otto/files/archive-0.html

    It’s called “Uncorking the Data Flow”

    Comment by J. Kevin Wolfe — November 1, 2005 @ 4:51 pm

  2. Thank Kevin, I’ve updated the post to reflect the new address. Great site!

    Comment by Steve — November 1, 2005 @ 5:06 pm

  3. This has been made into an Action…

    …unfortunately Kevin’s original code didn’t make it in though !

    It can be downloaded on the Apple Automator pages, here.

    regards

    Ric

    Comment by Ric Latham — November 4, 2005 @ 3:54 pm

  4. That action is for show-hide invisibles, not a technique for storing data in a workflow. In any case, it’s already here: http://www.automatorworld.com/archives/show-and-hide-invisibles/

    Comment by Steve — November 4, 2005 @ 4:00 pm

  5. Ric really did create an action for this. Swear! It’s here.

    http://www.mac-help.com/forums/showthread.php?p=1460#post1460

    Note that Ric’s action is more convenient for creating the workflow. The applescript way may be necessary if you plan on sharing the workflow, since the action would need to be installed on the other machine as well.

    Comment by J. Kevin Wolfe — November 5, 2005 @ 5:31 am

  6. Ah so he did. I’ll post it here as well. If it’s any consolation, you script is actually less verbose (if you discount the comment) ;)

    Comment by Steve — November 5, 2005 @ 8:07 am

  7. Hi! Very nice site! Thanks you very much! 1AVauqghOA

    Comment by UKn6pzSpgZ — January 12, 2007 @ 5:41 am

  8. Ok, I’m pretty new to Automator, as my question will surely point out, but I can’t seem to get an action working where I make a New Folder with the clipboard contents as its name.

    Basically, I run a shell script to get the date, copy that to the clipboard and then I want to create a new folder with today.s date as its name.

    I really can’t get the clipboard contents to do anything in this case.

    Comment by Adam Blainey — December 11, 2007 @ 8:31 am

  9. nrVymv comment5 ,

    Comment by andry — May 7, 2009 @ 2:32 pm


Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>