Thursday, January 6, 2011

Automator and Avoiding Real Work

I thought of another thing I'd like to automate:
It'd be cool if all the papers I was working on had Aliases on the Desktop.  This would be annoying though, because I Save As... a new draft every time I delete more than a paragraph.  So, I think I'm going to try to make a "New Draft" workflow where I can just clickit and it will Save As a new draft, delete the old alias and make a new alias.

I probably shouldn't be messing with this stuff because there's a chance I'll find a way to delete everything that matters in my professional life.  But....but nothing.  It's better than actually working.

Sweet!  I made one that actually works!

  1. You have to save a Workflow into: You/Documents/Microsoft User Data/Word Script Menu Items
  2. Then it goes: 
Save Word Document->Close Word Document->Duplicate Finder Items-> a whole bunch of Rename Finder Items -> New Aliases -> Open Finder Items.
    • All the "Rename Finder Items" are Replace texts to change the Draft Number
    • It'd be easier to just mark each new one with the date, but I don't like that
    • So it goes in reverse order, with the first one being the highest draft number possible (if it doesn't go in reverse it will just keep renaming it until it's the highest number)
    • The last find and replace is to remove the word "copy" from the filename, which was put there by the "Duplicate Finder Item" thinger.  You actually have to replace " copy" with the space before the word, otherwise it adds a space each time you rename it.
Sweet!  There's some things I want to add!
  • It'd be nice if it could move the old Word file into my Drafts folder.
    • I can't figure this out because each project's Drafts folder has a different path, and I can't find a way to make the "Move Finder Item" thinger work based on a variable
  • It'd be nice if it could delete the old Aliases on the desktop
    • Pretty much the same thing.  I could make it erase all the Aliases?  Or all the ones over a certain age, or that haven't been used in a certain amount of time, but I don't like the way that will mess up other aliases.  I could add a label to all the aliases created this way, and then only delete the ones with that label that haven't been used in a certain amount of time...but...what if I don't work on an article for a while?
    • I sorta got this to work.  Added: Get Finder Items -> Move Finder Items to Trash
      • You have to right-click "Get Finder Items" and choose "Ignore Inputs" or it deletes the Alias you just made.
      • Buuuuut...it doesn't delete the previous Alias, for some reason.
      • Mini-UPDATE:  The "Move Finder Items to Trash" command seems to be deleting the word file as well, so I took that out and just manually delete Aliases as they become unwanted.  That's actually not any extra work, because I like these Aliases to be in a specific place on the desktop, so I'm messing with them anyway.
I bet I could do this in Python too...I mean, I don't know how, but I bet I could learn in time.  That way it could be an unlimited number of drafts, and I bet I could even get it to move the file to the Drafts folder.  Someday...


No comments:

Post a Comment