I can see the comments now. “Why not just…” But let’s be patient and save judgements until you’ve read the whole post.
Yes, I know there are tons of ways to control iTunes from your iPhone or your touch or another computer or your fancy remote. (Murphy even dug up an old Pocket PC recently to try out Salling Clicker, which also supports BT phones) But there’s no harm in having yet another avenue for getting some music playing.
Murphy stumbled into a script that checks the content of an email for instructions on what to play in iTunes, like a playlist or an artist. But there’s more – just like the title of this post says. The script can also tell iTunes to play through external speakers via your Airport Express. That might not sound like much, but it is, because iTunes doesn’t provide the necessary hooks to control speaker selection. Read more »
Murphy posted about emailing from Finder a while back. This new screencast was entered in the Macinstruct tutorial contest, winner to be announced next week.
Just drag a file to a folder and it flies off to a pre-determined email address. Optionally, have the action prompt you for a subject so you can find it later.
Murphy finds this technique extremely useful for quickly backing up important files to a dummy Gmail account – especially with the new 20MB attachment size. You have files you can’t bring yourself to delete? Drag them to the folder and they’re on their way to a mail server, just in case you want them later. No addressing, no need to click send. It’s just sent. Murphy knows you can drag files to the Mail icon in the Dock. This is more direct – no extra clicks!
If you’ve got multiple assistants you send files to all the time you could create a folder for each. Dragging a file to their folder is like dragging it to their inbox.
The new screencast details both a Folder Action and an Automator solution. They achieve the same thing in terms of sending. The difference is that the Automator method leaves the file in its original location on your disk, which might be more convenient. But the Folder Action method can be utilized from an SSH session. That opens up a lot of possibilities and offers extra convenience.
The Automator solution comes from a post on TUAW that was inspired by a post on MacOSXHints that was submitted by Murphy. How’s that for a chain of events?
Visit the previous post to download the AppleScripts used in the screencast.
Sometimes a file is just a little too big for the media you want to store it on or the pipe you want to squeeze it though. The split command is here to help. It’s fast, it’s easy – and it’s already on your Mac.
In the screencast Murphy splits a thirty-something megabyte video into 9mb chunks – so he can back them up on his gmail account. (I’m expecting a lot of “Wouldn’t it be easier to…” on this one.) Keep in mind this is not a video splitter. The pieces aren’t viewable until you reassemble them. But you can use split on all kinds of files, even your zip archives.
We’ll be using the cat command for reconstituting our original file. We’ve seen plenty of cat in previous screencasts, but we’ve never used it quite like this.
Also in the screencast: Murphy demonstrates that Folder Actions work in a Terminal session. He’ll copy the pieces from a split file to an action-enabled folder – and the pieces will be automatically mailed to his Gmail account! This post is action-packed.
Maybe you want to break up some super-jumbo files for dvd storage. Take a look at this if you’re planning on creating chunks over 2gb.
The syntax Murphy uses in the screencast for reassembly is the most straight-forward he saw anywhere on the web. If you look around a little you can probably find scripts that do the same thing. Or check out Murphy’s post on making a shell script, maybe you can make your own.
Folder Actions Via SSH – Retrieving Files on Your Mac From a PC
You’re going to be away from your Mac for the holiday weekend? What if you need some important files from your G5 while you’re gone? What if you only have access to a PC at Aunt Millie’s house?
We’ve still got ways to connect and retrieve files. Like using SSH to mail an attachment from a remote machine. You don’t need a screencast, Murphy’s already given you all the pieces.
First, set up a Folder Action on the machine you’ll be connecting to via SSH. Murphy has a screencast on sending email attachments to a predetermined address. Make sure your router lets port 22 in. You can learn more about port forwarding in the screencast on VNC.
Then you can make an SSH connection to the computer from just about anywhere. Use the zip command to package up multiple files if you’re not just emailing a lone file. Copy the file to your Folder Action equipped folder using SSH. The Folder Action will still kick in and email the file for you.
Obviously there are tools like rsync and scp – but of your needs are specialized a Folder Action could be your cure.
If you need to SSH from a Windows machine download PuTTY. PuTTY’s single exe is a snap to use. You should probably have a copy on your thumb-drive for convenient access.
Using PuTTy isn’t exactly the same as running a Terminal session on your Mac. For instance, you can’t use rsync to copy files from the PC to the remote Mac. If transferring files is a pressing need you can take a look at PSFTP and PSCP.
Here are the posts with information relevant to the task:
With the information in those screencasts you can extend the power of Folder Actions to SSH. Murphy’s not saying you’ll want to use this to email files – it’s just an example to illustrate the possibilities.
Some readers have pointed out that an Automator Droplet might be more useful than Folder Actions for mailing files. But you can’t trigger the Droplet from an SSH session like you can with Folder Actions. The Droplet has its benefits, but so do Folder Actions.
The Crazy Message Text script comes with OS X so you can make some festive looking emails for birthdays or holidays. But the finished product conjures up images of letters cut from a magazine and taped to a piece of paper. Like a ransom note from a James Patterson novel.
The script is fairly self-explanatory but Murphy’s throwing in a screencast anyway, in case you’re away from your Mac. It’s quick, take a look.
You’ve got other scripts in your /Library/Scripts/Mail Scripts folder – give them a peek – maybe there’s something you could use.
Note: The script generates a multi-color message, not something like the image in this post. Click the image above to generate your own classic-style ransom note.