Mr_Noodle wrote:My first question is: what kind of renaming do these do that Hazel can't do itself?
You may want to ask the authors of the respective programs if they can be triggered via AppleScript or if you can just open them as applications (and therefore use Hazel's "Open" action).
Hello Mr. Noodle
I got an answer back from Peter Maurer, the Dev of NameMangler, from a NameMangler forum:
Go ahead and contact Noodlesoft -- (snip) Basically, they'd have to add a means to open files in any application. Oh, and if they have additional questions, I'd be happy to try and help (
FIRSTNAME@manytricks.com).
In the meantime, however, you might already be able to do what you want. Hazel can do AppleScript, and you can open files in Name Mangler droplets via AppleScript.
Let's assume you have a droplet named "Droplet", then you can send the Finder selection to that Droplet with a script like this:
- Code: Select all
-- script begins --
try
set theAliases to {}
tell application "Finder"
set theSelectedFiles to selection
repeat with aSelectedFile in theSelectedFiles
set theAliases to theAliases & (aSelectedFile as alias)
end repeat
end tell
if (count of theAliases) > 0 then
tell application "Droplet" to open theAliases
end if
end try
-- script ends --
You'll obviously want to work Hazel into that script, but this should give you the general idea. There are basically two things to keep in mind:
1) For the "open" command to do its thing, you want the files you're going to rename represented by a list of aliases.
2) You need a surrounding try statement. If you left that out, AppleScript would throw an error on the auto-quitting Droplet and Name Mangler, which in turn would break your workflow.
I hope this helps! Cheers,
Peter.
I hope this helps other users.. it's useful glue.. but I'm getting tired of using AppleScript and Automator as glue (they crash. A lot!).
This is why I'd like support for NameMangler droplets.. and to get other Devs (like the BetterZip guy) to add a droplet system so that I can AUTOMATE via Hazel but then DELEGATE to more specialized apps like NameMangler & (if possible) Betterzip.
It's not that Hazel can't do pattern matching of tokens.. it's that NameMangler is more specialized in doing it if we already have droplets ummmmmm I'd like to be able to use the the Droplets (not the parent Application, which is *called* by the Droplet).
I hope this makes sense.
-Leo