Hey all. Been spending the last week or so, when I'm not working that is, mucking around with services and automator in Snow Leopard.
Ironically, even though I'm a programmer, or possibly *because* I'm a programmer, I'd never used automator before, so it's been a bit of a learning experience. And I have to sheepishly admit that I'm a *huge* fan of the "run applescript" and "run shell script" actions when things get tricky, <grin>. But this leads me to the trick. The bad news is, you have to write your own automator workflow service to add text to iTunes. The good news is, it's not hard, and Darcy from the screenless switchers has done most of the work for you if you're not sure how. It was listening to his podcast about Automator that gave me the idea, and the trick is, don't use the convert to audio automator action to turn your text into a sound file. Go into automator and create a new workflow. Select the "service" template. As the first action after the one the service template inserts for you, , select the "run shell script" action. Interact with it, and make your shell script look something like say -o filename where <filename> is the full path to where you want the file to be put, for example /Users/yvonne/desktop/output or, as in my case /tmp/ output Don't worry, you'll be deleting it anyway, so it doesn't really matter where you put it. the next action should be "get specified finder items" Make sure you set this action to "ignore input". Interact with it, and specify the file you created in the shell script as the specified finder item. You might need to create a dummy file so you can add it in the dialog box, or at least that's how I did it. After that, it was an almost exact copy of Darcys workflow, I think, or at least from what I remember of the workflow without listening to the tutorial again, anyway, <grin>. So the workflow looks something like: text in service receive selection any action run shell script get specified finder items import audio files set options of itunes songs set info of itunes songs add songs to playlist Not all of those are necessary, it's up to you how you set up your workflow once the file has been imported. But the end result is that this version will respect your system voice settings, not to mention that if you set the "show this action when the workflow runs" option in the set info action, you can add titles and authors and such, so you don't have to live with the defaults. The only thing to keep in mind before you do this is the say command. In previous versions,, I remember it used to have trouble with large amounts of text, or at least I think it did. The largest file I've tested this with was 160K, and it worked fine, but I've just created the workflow myself, so I have no real idea what the limits are, if any. Let me know if you need any more information, and I'll try to help. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MacVisionaries" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/macvisionaries?hl=en -~----------~----~----~----~------~----~------~--~---
